,I am trying to play an animation through c++ while a counter is above 50. Note i am new to using ue4. Ive read many solutions to playing animations through the forums, but nothing seems to be working for me. Not sure what im doing wrong. Currently i am following this
and the line of code which finds the animation through the file browser is causing unreal to crash upon play.
A better workflow is to make the animation member variable a UPROPERTY and create a blueprint based on the class.
Let me know if you want any further information on how to do this.
At the top of your class you’re playing the animation in, you’ll find something like AMyClass::AMyClass(). This is the constructor. You need to put your FObjectFinder code in there.
Please mark the question as correct if I helped, thanks!
Right click on your animation in the project browser, and select “Copy Reference” to get the correct path for the asset. Also, you can only use the FObjectFinder inside of a Constructor, so make sure you are using it in the Constructor.