SceneManager
Namespace: MonineEngine.Core
Manages Scenes within the game, managing updating and drawing. Can be used in scripts to load Scenes.
public static class SceneManager
Inheritance Object → SceneManager
Attributes NullableContextAttribute, NullableAttribute
Remarks:
SceneManager.CurrentScene and SceneManager.RendererService will be null until Engine.LoadContent() is called, as that initializes the manager.
Fields
Loading
Gets if the manager is currently loading a Scene.
public static bool Loading;
RendererChanged
An event that fires when SceneManager.RendererService changes to a new reference.
public static EventHandler<EventArgs> RendererChanged;
Remarks:
The sender in this event is not the SceneManager, but instead the new IRendererService instance.
Properties
CurrentScene
The currently loaded Scene.
public static Scene CurrentScene { get; }
Property Value
RendererService
Gets the current IRendererService instance being used for drawing.
public static IRendererService RendererService { get; }
Property Value
Methods
LoadScene(Scene, Boolean)
Loads the given Scene.
public static void LoadScene(Scene scene, bool resetServices)
Parameters
scene Scene
The Scene to load.
resetServices Boolean
Whether ServiceRegistry should have currently loaded services cleared to allow for re-registration.
Defaults to false, but can allow for clearing unnecessary services and more control when set to true.
Update()
Updates the currently loaded Scene.
public static void Update()
Draw()
Draws the currently loaded Scene.
public static void Draw()