Game Freezes in Mobile but plays normally in Editor
Hello guys,
So I am doing a card game. Right now I have three scenes: Splash/Main Menu/Game Level
The game is done. When I run it in Editor, it plays normally.
Now when I build and run either on Android or Iphone, the game freezes when I reach "Game Level" scene after few seconds.
What am I missing here? How can I find the bug?
Try narrowing it down by disabling different scripts and rebuilding. You could also check the logfiles(https://docs.unity3d.com/$$anonymous$$anual/LogFiles.html) for errors.
Thank you for your reply
Well i did not get any error on xcode console:
Skipping profile frame. Receiver can not keep up with the amount of data sent
(Filename: /Users/builduser/buildslave/unity/build/Runtime/Network/PlayerCommunicator/GeneralConnection.cpp Line: 338)
That's all what I get. In addition, Unity profiler is still running showing em the CPU usage.
$$anonymous$$oreover, my pause button is working ( i click on it and i can click on all buttons on the pause panel).
The game freezes when I start distributing the cards ( the cards and pause button are on a different canvas panel )
Do you have any additional tips?
Probably a crash. Some errors actually crash, and some just freeze. Probably code that doesn't work on mobile -- like files, touches, anything is #ifdef IOS ... . Or maybe you always had an error which you were ignoring (Editor runs won't crash on errors, but everything else will.)
On iPhone (maybe also Android,) you can just read the errors from Run in Xcode.
Thank you for your reply
Well i did not get any error on xcode console:
Skipping profile frame. Receiver can not keep up with the amount of data sent
(Filename: /Users/builduser/buildslave/unity/build/Runtime/Network/PlayerCommunicator/GeneralConnection.cpp Line: 338)
That's all what I get. In addition, Unity profiler is still running showing em the CPU usage.
$$anonymous$$oreover, my pause button is working ( i click on it and i can click on all buttons on the pause panel).
The game freezes when I start distributing the cards ( the cards and pause button are on a different canvas panel )
Do you have any additional tips?
Debugging iOS-only errors is a pain, but no different than anything else. Simplify to narrow it down, add debugging lines. Look up that message. Sometimes you have to be clever and print things to labels, specially made for that. Look for things that might work differently in iOS (it might not be that, but good place to start.)
It not only in iOS but in android too...That's really crazy! I mean the game is half frozen as the pause button is working...I can't think of any logical steps here
Your answer
Follow this Question
Related Questions
Connection with the local hard disk server using an static ip. 0 Answers
Still Unity3D Editor 2017.2 , Freezing in Mac OS High Sierra 3 Answers
Bug unity 5.2.1 Rendering UI With android 4.1.2 Jelly Bean 1 Answer
Unity craches inconsistently on Android during rendering in GfxDeviceGLES::DrawBufferRanges function 1 Answer
Bug Android build not exporting 0 Answers