Hello!
I’m using application.loadlevel() in a scene to load the next one, but in the exe file (on Windows) if I click with the mouse during loading time, it crashes the game
do you know what could be the problem?
thanks in advance,
Fabio
Hello!
I’m using application.loadlevel() in a scene to load the next one, but in the exe file (on Windows) if I click with the mouse during loading time, it crashes the game
do you know what could be the problem?
thanks in advance,
Fabio
Use SceneManager.LoadScene(“sceneName”) instead.
Aplication.LoadLevel() is obsolete.
First, “Application.LoadLevel()” is obsolete, use
SceneManager.LoadScene ("NameOfTheScene");
instead.
Second: why would you click during the reload process?
I think application.loadlevel(); doesn’t work anymore.
Try this instead.
using UnityEngine.SceneManagement;
As a using statement. Then use:
SceneManager.LoadScene("**** scene name or number in here****");
In your scene change function.
I am using SceneManager.LoadScene() in my game, however I have the same problem of that game crashing if the mouse is clicked while a scene is loading.
– NosadaThank you so much for the answers everyone ![]()
I’ll try it out and let you know!
As previously answered several times, including [here][1], [here][2], and [here][3], you need to copy it from C:\Program Files (x86)\Unity\Editor\Data\Mono\lib\mono\2.0 and place it in your project's assets directory. [1]: http://answers.unity3d.com/questions/517264/unity-and-the-dlls.html [2]: http://answers.unity3d.com/questions/965867/cant-find-systemdata.html [3]: https://forum.unity3d.com/threads/missing-c-references-to-system-data.11361/
– tanoshimi
Hello everyone! still no use, I tried with SceneManager.LoadScene ("NameOfTheScene"); but it has the same problem, if the player click with the mouse, the game crashes. (if not the scene is loaded correctly). do you know what could be the problem? thanks
– MalboM