Given the following code :
UCLASS(Blueprintable, hideCategories = AnimInstance, BlueprintType)
class UTestProjectAnimInstance : public UAnimInstance
{
GENERATED_BODY()
protected:
UPROPERTY(BlueprintReadOnly, EditDefaultsOnly)
bool TestProp;
public:
virtual void NativeInitializeAnimation() override;
};
void UTestProjectAnimInstance::NativeInitializeAnimation()
{
AddNativeTransitionBinding("root", "A", "B",
FCanTakeTransition::CreateLambda([this]()
{
return TestProp;
}));
}
And the following anim graph :
The graph compiler emits the following warning :
A to B will never be taken, please
connect something to Can Enter
Transition
Looking at the source code, the check in UAnimStateTransitionNode::ValidateNodeDuringCompilation checks for the presence of native bindings, but this is done prior to the invokation of NativeInitializeAnimation, and therefore can never detect the presence of our bindings.
Is there an “earlier” hook we can use to bind our native checks, one that would be run before the call to UAnimStateTransitionNode::ValidateNodeDuringCompilation?
I understand we can put a dummy blueprint transition check in all of our transitions but I would prefer avoiding that.