Ultimate Replay Scripting Reference
MonoSingletonT Class |
Singleton imeplentation using MonoBehaviour as a base class.
A dedicated owner object is created so that the singleton instance can be attached to it.

SystemObject Object
Component
Behaviour
MonoBehaviour
UltimateReplay.UtilMonoSingletonT
UltimateReplayReplayManager
Component
Behaviour
MonoBehaviour
UltimateReplay.UtilMonoSingletonT
UltimateReplayReplayManager
Namespace: UltimateReplay.Util
Assembly: UltimateReplay (in UltimateReplay.dll) Version: 1.0.0.0 (1.0.0.0)

C#
public abstract class MonoSingleton<T> : MonoBehaviour where T : MonoSingleton<T>
Type Parameters
- T
- The generic type that the singleton is wrapping
The MonoSingletonT type exposes the following members.

Name | Description | |
---|---|---|
![]() | MonoSingletonT | Initializes a new instance of the MonoSingletonT class |

Name | Description | |
---|---|---|
![]() | Awake |
Called by Unity.
Allows the singleton to find and claim any scene instances.
|
![]() ![]() | ForceAwake |
Attempts to forcefully create the singleton instance if one does not already exist.
|
![]() | OnApplicationQuit |
Called by Unity.
Allows the singleton to prevent recreation of the instance when the game is about to quit.
|

Name | Description | |
---|---|---|
![]() ![]() | active |
The active singleton instance or null if no instance has been created yet.
Use Active to guarentee that the instance is non-null.
|

Name | Description | |
---|---|---|
![]() ![]() | Active |
Get the active singleton instance.
If not instance exists then one is created.
|
![]() ![]() | IsDisposing |
Returns true if the singleton is currently disposing.
This will only occur when the game is about to quit.
|
