- Home /
OpenScene Twice Causing "PlayerLoop Called Recursively"
I'm currently doing the following, via an Editor script:
Open a scene.
Play the scene. Wait for an event indicating scene completion.
Stop the scene playing.
Load another scene.
This works fine, until Step 4. I get an error, PlayerLoop called recursively! Note that this error gets thrown on the EditorApplication.OpenScene line, but it gets thrown whether or not I give it a valid path for a scene. Anyone got any idea why this is happening? Is it because I'm performing OpenScene twice within a single execution? I can't think of a reason why this would happen.
EDIT - Note that this doesn't seem to crash anything. The editor can continue executing code. For instance, both Log statements print out:
Debug.Log ("Here comes the error!");
EditorApplication.OpenScene("/path/to/scene.unity");
Debug.Log ("This is fine, though.");
But obviously it's probably not a good sign.
Your answer
Follow this Question
Related Questions
How to find object references internally in a scene 2 Answers
Why Unity crashes and how can I fix it? 0 Answers
My game worked better on "Maximize on play" and the problem for not maximized was Gizmos. 0 Answers
Accessing a UnityEditor class. 1 Answer
Unity Editor, Scene and Game View, suddenly very slow 2 Answers