I am trying to check the values of the C++ ‘Native Class’ of a Blueprint object, in C++ code. I am working with a derived EditorValidator_Base class. I want to validate that my blueprinted MyGameplayAbility objects have certain fields set properly (ex: duration = 0 for duration policy of instant, positive magnitude values for healing abilities, etc).
CanValidateAsset_Implementation works as intended as I check for the passed asset’s class to be UBlueprint and that asset’s parent class is equal to MyGameplayAbility.
Within ValidateLoadedAsset_Implementation is where I want to access the values within the MyGameplayAbility class of the asset I am validating, but I cannot find any way to do this.
Is this something where I am missing the forest for the trees or is this actually a problem process?
The object is a UBlueprint of the UMyGameplayAbility class. If I cast directly to UMyGameplayAbility, it fails. While it is possible to use a UGameplayAbility class (or derived class) directly as this asset type, this sacrifices the functionality of blueprints for special abilities and removes the need to manually code every exception.