- Home /
Game object delete itself from hierarchy when I play animation
When I play animation which change offset polygon collider 2D the gameobject with animator destroy itself in hierarchy for no reason. When I remove collider offset the animation start working properly once again but without collider it's unusable for the game. Until this day it was working properly but suddenly it has broken for no apparent reason. I haven't change animation in any way. Only thing I did was importing Google Play Service and installing some SDk's. I was trying to find solution the whole day but came up with nothing and now I am desperate.
destroy itself in hierarchy for no reason
There is always a reason. You have a script calling Destroy
somewhere in your scene.
I have Destroy
in other script but it has nothing to do with this game object. But as I said when I remove collider offset propertie from animation the object will not destroy itself but when I add it again it's broken again.
Answer by TheFish657 · Jan 19, 2016 at 09:24 PM
Did you delete the game object during recording. Check your dopesheet/curves to see
Your answer
Follow this Question
Related Questions
2D Animation does not start 1 Answer
How do you move Animations inside the Animator Controller hierarchy? 1 Answer
Character Hit Animation play endlessly 2 Answers
how to make a irregular ground or slope,About irregular terrains and slopes 0 Answers
How to play a destroy animation? Brick Breaker/Arkanoid. 1 Answer