OMIDIV
SceneRegistry Class Reference

Holds a list of Midi visualization scenes. More...

Inheritance diagram for SceneRegistry:

Classes

class  Folder
 Represents a directory structure of scenes. More...
 

Static Public Member Functions

static void RegisterScene (int index, string name, string path="/")
 Adds a midi visualization scene.
 

Public Attributes

int StartupSceneIndex_ = -1
 Allows StartupSceneIndex to be overriden from the Unity editor.
 

Static Public Attributes

static Folder SceneDir = new("")
 The available visualization scenes as a directory structure.
 

Properties

static IReadOnlyDictionary< int, string > Scenes [get]
 Maps build index to display name.
 
static int StartupSceneIndex = -1 [get, set]
 The build index of the scene that will be loaded at startup.
 

Detailed Description

Holds a list of Midi visualization scenes.

On startup, it reads the list of scenes in the build settings and adds all scenes that don't start with a '#'.
Scenes can be added with RegisterScene and a read-only list returned with Scenes

Member Function Documentation

◆ RegisterScene()

static void SceneRegistry.RegisterScene ( int index,
string name,
string path = "/" )
static

Adds a midi visualization scene.

Parameters
indexThe build index of the scene.
nameThe display name of the scene.

It is possible to add any scene, including ones that do not have any MidiScene or ImGui component, but they will still be added to the View list.

Property Documentation

◆ StartupSceneIndex

int SceneRegistry.StartupSceneIndex = -1
staticgetset

The build index of the scene that will be loaded at startup.

Change this to change which scene opens first by default.
If the value is invalid (-1, anything < 0, or a scene that starts with '#'), it will be replaced with the first valid scene's index by the Start function.


The documentation for this class was generated from the following file: