Class SingletonManager
- Namespace
- SharpPluginLoader.Core
- Assembly
- SharpPluginLoader.Core.dll
Provides access to the game's singletons. (Anything that inherits from cSystem)
public static class SingletonManager
- Inheritance
-
SingletonManager
- Inherited Members
Methods
GetSingleton(MtDti)
Gets a singleton by name.
public static MtObject? GetSingleton(MtDti dti)
Parameters
dti
MtDtiThe DTI of the singleton
Returns
- MtObject
The singleton, or null if it doesn't exist
Remarks
This method can't be called from OnPreMain(), OnWinMain() or Initialize(), as the singletons aren't initialized yet at that point.
GetSingleton(string)
Gets a singleton by name.
public static MtObject? GetSingleton(string name)
Parameters
name
stringThe name of the singleton
Returns
- MtObject
The singleton, or null if it doesn't exist
Remarks
This method can't be called from OnPreMain(), OnWinMain() or Initialize(), as the singletons aren't initialized yet at that point.