Setting a reference variable to the AnimBP in the actor construction script creates a new AnimBP instance
I'm using a binary UE 4.12.0 Preview 4 build. When I create an animation blueprint reference variable in the actor blueprint that owns it, and then set it in the actor's construction script, a new animation blueprint instance is created instead of a reference to the current animation blueprint.
1) Create a new ThirdPersonCharacter blueprint project for testing.
2) Open the ThirdPersonCharacter blueprint and add a new variable of type "Third Person Anim BP Reference" called "MyAnimBP".
3) Set this variable from the character construction script as follows:
4) If you Simulate (Alt+S) and open the ThirdPerson_AnimBP, you'll see two instances under Debug Filter:
5) The problem can be also be shown by adding the following nodes to the character event graph:
6) Play the game and move the character. Notice that a speed of zero is always printed on screen. This is because our AnimBP is new instance instead of the character's instance.
7) The problem does not happen if instead of setting the variable during construction, we set it during Begin Play. Remove the construction script nodes and add the following to the event graph:
8) Play the game again and see that the speed is now printed properly. So the problem happens with construction script only.
asked May 24 '16 at 06:02 AM in Bug Reports
Hi Ricardo Costa,
I was able to reproduce this on my end and have entered a bug report, UE-31229, to be assessed by the development staff.
answered May 24 '16 at 05:59 PM
Follow this question
Once you sign in you will be able to subscribe for any updates here