Unity 5 Animator hides Sprites on Android [Strange]
Hi everyone!
Three days ago i encountered a very strange behavior with my animation. I made a looping idle animation for my static (not moving!) character. There is absolutely no problem in the editor in play or out of play mode. But when I build the game, and start it on my Android phone (ZTE Blade L2), some of my objects disappear. At first the whole character disappeared, but the collision and the coordinates are the same. I "fixed" this situation by completely rebuilding the character. Now only some of the objects are hidden...
This happens only when the Animator is enabled!
I have already cleaned up the animation, so there are no unused or unnecessary keyframes & properties.
I have been googling around in the last two days. What I've seen:
Sprite Z scaling might be flipped. (It isn't)
Camera might not render the layer on which the Sprite is on. (It is)
Sorting layers might be messed up. (They are fine)
The objects might be clipped by the camera or change their Z position (They aren't)
I'm going crazy with this issue so I would really appreciate if someone could help me out. I'm providing any info required.
The hierarchy (every one of these are on the 'Foreground' layer):
Player - (empty container with a Rigidbody2D and a SphereCollider2D)
--- Trail - (a particle system) Sorting: Entity / 2
--- ATL_Darkness_0 - (base shape of the character, has the Animator) Sorting: Entity / 1
--- --- ATL_Darkness_Head - (the eyesocket of the character) Sorting: Entity / 3
--- --- --- ATL_Darkness_Eye - (the orange eye) Sorting: Entity / 4
--- --- --- --- Eye_Flames - (flaming particle system on the eye) Sorting: Entity / 5 HIDDEN
--- --- --- ATL_Darkness_TopJaw - (upper teeth) Sorting: Entity / 4 HIDDEN
--- --- --- --- ATL_Darkness_BottomJaw - (lower teeth) Sorting: Entity / 5 HIDDEN
Any help is much appreciated! - Screenshots included!
Encountering same problem here. Everything works correctly in the editor, but the moment I use an Animator based sprite hierarchy, all the sprites of the game toggle visibility see$$anonymous$$gly randomly, even if they use Animation component.
Well... I couldn't fix it. I had to make my animation completely sprite based. :/
Then take a look here: http://answers.unity3d.com/questions/1129862/animated-sprites-disappear-then-rotated-on-android.html#answer-1130928
This solved my problems by right clicking on each animation rotation and setting it from Euler to Quaternion in the animation pane.
Your answer
Follow this Question
Related Questions
Animation events not working for my sprite animation 0 Answers
How to create a sprite animation template? 0 Answers
TileMap in custom layer doesn't render 1 Answer
Sprites Clipping Trough 3d Objects 0 Answers
Unity2D animation and sprite layout 0 Answers