This repository was archived by the owner on Mar 25, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 5
InitializerSystem
pointcache edited this page Jan 15, 2017
·
4 revisions
Governs startup sequences. These are public events that you can hook up to customize your initialization.
//Used when we are switching scenes/maps and we need to get notified when this happens, its different from
//OnSceneLoaded in that onscene fires every time you hit play, while this fires only when you manually force scene
//switch, right before it happens, so core systems have a chance to clean up in preparation for new scene
public static event Action OnManualSceneSwitch = delegate { };
/// <summary>
/// Hook your config loading here, it will happen before global systems are initialized
/// </summary>
public static event Action OnGlobalLoadConfigs = delegate { };
/// <summary>
/// Hook your configuration events that use configs, happens after configs were deserialized
/// </summary>
public static event Action OnApplicationConfiguration = delegate { };
/// <summary>
/// Deserialize your initial player profiles, etc
/// </summary>
public static event Action OnInitialLoadPersistentData = delegate { };
/// <summary>
/// Hook your configuration events that use configs, happens after configs were deserialized
/// </summary>
public static event Action OnGlobalSystemsEnabled = delegate { };
/// <summary>
/// Hook your save loading here, it will happen before local systems and loaders are initialized
/// </summary>
public static event Action OnLoadLocalData = delegate { };
/// <summary>
/// Hook your level creation/generation/object spawning here
/// </summary>
public static event Action OnLoadersEnabled = delegate { };
/// <summary>
/// Will enable LocalSystems stack
/// </summary>
public static event Action OnSystemsEnabled = delegate { };
/// <summary>
/// Hook your ui here
/// </summary>
public static event Action OnUiEnabled = delegate { };