Animating rotation not working on android build... ? (155385)

Hello Developers.

I am using latest unity for now version 5.3.

Using Animator to animate rotation values of an object is not working in mobile builds.
animating rotation works fine on PC - but as soon as I try to test on android - object disappears as soon at it start rotating.

Doing rotation through C# coding works find - but I want to do it through “Animator”.

Thanks in advance.
have a happy new year :wink:

2 Answers

2

The same exact thing had been happening to me. I fixed it by changing the rotation from Euler Angels to Quaternions in the Interpolation options.

I tried it - problem remains :(

It worked for me. Thanks!

Actually it might work but this is not a good solution. You do the GameObject.Find twice, this is unnecessarily resource consuming. Plus in specific case i guess you could end up with a null reference. In my opinion this is highly inelegant. But if you want to do it that way, you should a least consider using the return of FindWithTag. GameObject tmp = GameObject.FindWithTag("enemy"); while (tmp != null) { Destroy(tmp); tmp = GameObject.FindWithTag("enemy"); }

You can't run a while loop in a void. It must be an IENumerator. And never do a while loop without a yield of some kind (yield return null) or you'll freeze unity.

Same problem with rotation by Animator on mobile devices (android/ios).

upd:
Found this https://fogbugz.unity3d.com/default.asp?752955_83977vsgmerd25rq