Component reset, caused by a simple setup (Demo project included)

Animation of skeletal mesh is working in Editor window and Standalone mode, but not in packaged game. Tested with Shipping and Development configurations, on 4.6.1 and 4.5.1. Pure blueprint project. How to reproduce:

  1. Import some skeletal model and at least one animation, create a simple Animation Blueprint that plays this animation.
  2. Create “Person” blueprint from Character parent class. Select previously created animation blueprint in its Defaults tab / Animation.
  3. Create “Player1” class that is child of previously created “Person” class. Select imported skeletal mesh in its Defaults tab / Mesh. Drag him into level.
  4. Create “TEST” blueprint from Actor parent class. Make “Test1” function inside it and put [Get Player Character] → [Cast To “Player1”] nodes there, connected to the function input. … OR CREATE REFERENCE TO ANY OTHER BLUEPRINT THAT HAS VARIABLE OF “PLAYER1” TYPE, FOR EXAMPLE CUSTOM PLAYER CONTROLLER WITH “MYPLAYER” VARIABLE OF “PLAYER1” TYPE.
  5. In “Person” blueprint, create variable “testVar” of “TEST” type.

I’ve created a simple project demonstrating this bug, in 4.6.1: Bug Demo Project

I need to find some workaround to get animation working, do you have any ideas?
BTW. This bug came out of THIS topic as a result of my troubleshooting.

Update: It’s not animation-only problem, looks like it resets whole Mesh properties to default when packaging! To reproduce:

In Components tab of “Person” blueprint, change Mesh position and rotation (for example -90 on z axis), so the mesh will sit on the ground. Package the project. Result - mesh position and rotation are reset to default (0) + no animation.

I’ve just tested it again, and this bug occurs only when using CharacterMovement component. I’ve found a workaround - instead of assigning Animation Blueprint and Skeletal Mesh through Defaults tab, i’ve made public variables of AnimBP and Skeletal Mesh type. Then i assign them to the actual SkelMesh and animation instance class in Construction Script. But the bug is still there.

I’ve made a few changes and this bug shown up again. But now it resets my custom “AnimBP” variable on my player, that i set via Defaults tab. It’s a variable of AnimInstance Class type. It occurs under the same circumstances - this weird variable/object (circular?) reference. But now it occurs even when i restart editor, no packaging needed.

Hey Slavq-

I was able to confirm on my machine that setting the animation in a parent blueprint and setting the mesh in a child blueprint causes the animation to not play when packaged. I submitted this bug to our internal tracking database (UE-7987) for further investigation by an engineer.

Cheers

Checked your previous thread - very good job on investigating this bug! I have a very similar (probably the same) issue, so really hope this one will get fixed. Upvoted.

Hi Slavq,

I’ve been actively working on this issue. I do have an engine code change that fixes this, we are still discussing several possible approaches but I do believe with some confidence that this will be fixed next release.

-Zak

That’s good to hear :slight_smile:
Thanks

I downloaded your project and also confirmed that my fix works. Thanks for the info and for providing a test project!

Hi,
this hasn’t been fixed in 4.7 release, right? Or I am having another bug which is due to be reported.

Cheers

Theo

I haven’t tested yet if this particular bug is fixed in 4.7.1, but a quite similar, new bug appeared (this one was resetting anim bp, and the new one is resetting ALL variables: https://answers.unrealengine.com/questions/179108/problem-with-default-values-of-variables-being-res.html )

You might want to check 4.8. I had the kind of problem in my project and the first preview of 4.8 fixed it!

Hey Slavq,

Thank you so much for all the details of your investigation. It really helped me a lot. I just tested the first preview of 4.8 and it fixed the problem for me.

Good to hear that! I’ll wait until official 4.8 release and also test it on my project.

In official 4.8 I still have this bug - and i’m 100% sure (I’ve tested it) it’s because AnimInstance type variable (which determines my player’s Animation Blueprint) resets to None after packaging… Along with many other variables, for example Texture2D type variable, which causes my player to be untextured, or some boolean variables, which is game breaking :frowning: It is very similar (probably the same bug, caused by the way blueprints are referencing each other) to THIS ONE, I’ve also posted it with repro project.

Hey CodeSpartan, just a heads up, probably we’re facing the same bug again.

Hey Slavq-

As mentioned in the other post you created, a new report has been created (UE-17464) to track this issue.

That sounds scary! I can’t test it on my end yet, but I hope that this bug won’t return in the official 4.15 release… It is basically a game breaker.

BTW. I’m not sure if someone from Epic will be notified about this, maybe a new report or a comment under @ 's answer will help, just to be sure.

Hey guys I know this is been a dead thread, but this occurs again in 4.15…

I am doing my game since 4.8 and after upgrading to 4.15 this happened. never happened before, and I have done a LOT of tests in 4.12 and 4.13, now on 4.15 this happened.

Hey BagmanPT-

Can you elaborate on what you’re seeing? The specific issue originally reported has been fixed, so what you’re seeing is likely a different issue. It would be best to create a new post to track the issue separately. Please provide as much detail about your setup / reproduction as possible.