Hi, I have subclassed UAnimInstance and ACharacter in C++ and have extended them in Blueprint. Now in my AnimInstance C++ class I initialize stuff in NativeInitializeAnimation() which I am told behaves like its constructor. I also fill in some variables defined in my C++ Character class in the Character Blueprint’s construction script. I access these variables from my C++ AnimInstance class in NativeInitializeAnimation().
Now what happens is that NativeInitializeAnimation() is being called twice on Play start. The first time it looks like the variables in my C++ Character class are not set and the second time it runs lt looks like the Character Blueprint’s construction script was run and now I have the variables set. Why is it being called twice ? Whats the best way to initialize stuff for the AnimInstance class ?
Thanks
Sanjit
Apologies if this question also appeared in the AnswerHub yesterday, I posted it there but it seems to have disappeared… maybe I didnt click the submit button! ]