void UAnimInstance_Player_PnC::NativeUpdateAnimation(float DeltaSeconds)
APlayer_PnC* owningActor = GetOwningActor();
if (owningActor != nullptr)
I realise this is more of a C++ type question than game dev specific, however I have noticed when I ask on Stack Overflow I get a C++ answer which is often not compatible with Unreal Engine way of doing C++.
I may be wrong, but I thought a child class has an "is a" relationship with its parent classes. So I thought that if I have
APlayer_PnC : public ACharacter (which ACharacter is of course extending APawn , and then AActor), I would be able to 'find' it using the
It gives the error
AActor* cannot be used to initialize type APlayer_PnC* . I get it that I can just change that to AActor, but I need a variable that is part of the APlayer class.
What can I do to get access to a public variable in my
The function I posted above is located in my custom AnimInstance class, which I have set my Player Blueprint to use and have re-parented the Anim Blueprint to my AnimInstance, but the variables do not show up.
I can post the full code if that will be of use, let me know.