D
D
Dima_Demichev2017-06-21 19:25:05
Android
Dima_Demichev, 2017-06-21 19:25:05

Unity game freezes on android while loading a scene. What could be the reasons?

Good afternoon, the reason for the question lies in the incomprehensible behavior of Unity, namely, freezing when switching to another scene. To begin with, the project has two scenes, menu - the menu of the game when it is opened, and main - where the main game actions are performed. Everything works fine in the editor, the transition by clicking on the image works, but after compiling and installing it on android, the transition to the stage does not want to work even with:

void Start()
    {
        SceneManager.LoadScene("main");
    }

those. the game just freezes and the transition does not work (when it freezes, the screen darkens).
I want to add that on the main scene there is also a restart button, and so this picture (yes, yes, this is a picture, not a button) has one script with the start picture on the menu scene.
void OnMouseDown()
    {
        SceneManager.LoadScene("menu");
    }

That is, when the main scene is "updated", everything works, but when you GO to the scene, everything freezes.
I will also add that both scenes are added to the Build settings.
What exactly is the problem?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
Denis Gaydak, 2017-06-21
@Dima_Demichev

Well, for starters, you should look at the log from the android device.
android sdk, log, monitor - google if you don't know how to see this log.
As an option, you run this scene on an android device with a small amount of RAM. and the game just throws / unloads.
but without a log and any hints at all - this is all guesswork from the coffee grounds.
And are you sure that the problem is in the TRANSITION ?.
If you collect only the MAIN scene and run it on the device, does the scene also not load?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question