[Tutorial] Launcher scene doesn't unload
Options
Hi, I went through the quickstart tutorial and set up the 4 room battle. After I quit the application the Launcher scenes from runtime stays in the scene tree as "Laucher (not loaded)". Sometimes there are even 2 of those scenes in addition to the open Laucnher scene. When I switch to edit another scene it goes away but when returning to the launcher it is gone.
0
Comments
-
Hi @firegate666,
Thank you for choosing Photon!
I assume you use PUN2.
Find calls toLoadLevel
inOnLeftRoom
orOnDisconnected
Photon callbacks. Those should not be called in caseConnectionHandler.AppQuits
is true.
Otherwise, check if you have LoadLevel calls insideOnApplicationQuit
orOnDisable
orOnDestroy
Unity callbacks.
The idea is thatLoadLevel
should not be called when the application is quitting.
Replace:PhotonNetwork.LoadLevel("Launcher");
with:if (!ConnectionHandler.AppQuits) { PhotonNetwork.LoadLevel("Launcher"); }
0 -
Thank you, that was it!0