I have spent 12 months on my first game and launched it on the app store. It’s been approved and is currently on the market.
I have extensively play tested this game and it all works perfectly within Unity Editor. From start to finish. However, when playing the app once you get to level 3 the function of killing an enemy doesn’t work meaning people cannot kill and re-spawn an enemy. This then happens on every similar level. This makes the game unplayable.
However if I play the game thoroughly within the editor the game works perfectly without any problems. I have had to contact apple to remove the game at least temporally until I can think of a fix.
How could the game be working perfectly in Unity, but then not work in the app? I didn’t even know that could happen to be honest. I normally have no problems debugging code etc but how would I go about debugging this issue when there is no issue within the unity editor??
I am a bit desperate here.
Thanks in advance
James
Debug.Log works just fine in a build. Debug.Log everything involved in functionally which is breaking in the build, and you’ll likely quickly find what is going wrong.
Mobile devices have lots of limitations that computers (and hence the Editor) do not. You won’t see the effects of these limitations if you’re not testing on the mobile device.
For example you could have a null reference error in your code from something you are trying to access, but that thing doesn’t exist because it isn’t supported on the mobile platform. All your code which follows that null reference error then isn’t run, which causes other seemingly unrelated issues in your game which only relate to the missing asset once you examine the code and understand which code isn’t being run.
Other limitations are CPU/GPU performance, where the mobile device will be considerably limited compared to your computer. This can cause the timing of various methods being called to be different on the mobile device than on the computer, which can cause different and unintended behavior on the mobile device.
Lastly the mobile device uses a touch interface instead of keyboard/mouse. It is possible to have an interface which works fine with keyboard/mouse but breaks when using touch.
You haven’t actually described your specific issue so no one can even guess as to the actual problem, but I’ve personally seen all of the above and I haven’t even done much on mobile. It is not generally a big problem, because you should be doing the vast majority of your play testing on the actual build on the mobile device, not in the editor. You should have seen your specific issue on the first play through. Editor testing should primarily be for immediate feedback for changes you are making. Not full play testing.
Even unrelated to mobile, the Editor includes a lot of editor specific debugging which changes the performance of your game compared to even a standalone Windows/Mac build. So even if targeting PC you should be doing your play testing on a build, not the editor.
Joe Censored - Thanks so much for the reply. I never realized. I am a complete novice at this and had an idea for a game and built it. I will test it in there. I just thought I have a touch screen laptop and it would produce the same results. One final complete embarrassing beginners question, if I use unity remote with my device will this replicate exactly the same as the final build?