- Home /
Mobile game has different behaviors on android and ios
I made a mobile game on unity, initially targeting the ios platform. The game works fine on ios devices. I then switched platform to android. Now I find that a lot of logic of the game is not working as expected. For example in the game, when an enemy attacks my character, my life is not reduced or the enemy do not follow me or behaved erratically.
Did I miss something in switching platform or is it a problem with unity?
Do you get any warnings on the console? do you use JavaScript? I did multiple projects working across android/ios without having many issues apart from the obvious ones such as catering for different screens, texture compression etc. but the logic normally is the same
also make sure that all the references to scripts in gameobjects are still in place
The warnings I get are Shader is using clip instruction (usually caused by alpha test). It might cause problems on some Qualcomm/Adreno drivers. UnityEditor.BuildPlayerWindow:BuildPlayerAndRun()
I use a mixture of javascript and C# scripts.
I see... this shouldn't be the problem from what you described it seems more like missing behaviours.. i.e. some of your scripts are not attached to game objects... is that the case?