Class SceneNames
A loaded scene's name without the garbage: UnityEngine.SceneManagement.Scene.name builds a new string on every read, and the render hooks that seed their placement from it (ambient and sea life, sea floats, the glow sky's episodes) read it every frame.
public static class SceneNames
- Inheritance
-
SceneNames
- Inherited Members
Remarks
Kept by the scene's handle, and forgotten whenever a scene is loaded, unloaded, opened, closed or saved (a save can rename it), so the answer is always the one UnityEngine.SceneManagement.Scene.name would give. Main thread only, as the SceneManager is.
Methods
Forget()
Forgets every name (the next read asks the scene again).
public static void Forget()
Of(Scene)
The scene's name, as UnityEngine.SceneManagement.Scene.name; null for an invalid scene, as it is.
public static string Of(Scene scene)
Parameters
sceneScene