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.

Repro steps:

  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”.

91750-repro1.png

  1. Set this variable from the character construction script as follows:

  1. If you Simulate (Alt+S) and open the ThirdPerson_AnimBP, you’ll see two instances under Debug Filter:

91762-repro3.png

  1. The problem can be also be shown by adding the following nodes to the character event graph:

91763-repro4.png

  1. 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.

  2. 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:

  1. Play the game again and see that the speed is now printed properly. So the problem happens with construction script only.

Hi ,

I was able to reproduce this on my end and have entered a bug report, UE-31229, to be assessed by the development staff.

… kind of same issue … here are screen shots … seems ThirdPerson_AnimBP not responding and well it is part of default engine contents … I just add one event there …

here in ThirdPerson_AnimBP

and here in my BP_Parser blueprint

Can you please let me know if there is any alternative solution for this … ? I Like to play with speed in state machine in “Default” 3rd person character and Event Dispatcher looks like a solution, but it doesn’t work thou…

… fixed my issue with this solution … I got mesh from my spawned character and from that mesh, I got Anim Instance and that. was a succeed on Target … Please if you have any suggestions, leave comments… : ) ,

BP_Parser

ThirdPerson_AnimBP

So in result, I can smoothly change between idle and run/walk depends on Speed value which I pass to state machine in ThirdPerson_AnimBP

I’m not able to get the node “get anim instance” at all in a construction script. How did you do it? seems like magic to me…