Click or drag to resize

SingletonManager Class

Static class to manage Unity-friendly Singletons which should be derived from SingletonBehaviour.
Inheritance Hierarchy
SystemObject
  ImmerseSDKSingletonManager

Namespace:  ImmerseSDK
Assembly:  ImmerseSDK.App (in ImmerseSDK.App.dll) Version: 3.9.0.0 (3.9.0.0)
Syntax
C#
public static class SingletonManager

The SingletonManager type exposes the following members.

Constructors
  NameDescription
Private methodStatic memberSingletonManager
Top
Methods
  NameDescription
Public methodStatic memberAllServicesReady
Checks if all registered services are ready
Public methodStatic memberClear
Clears out all existing singleton references. Use with care.
Public methodStatic memberCreateSingletonT
Instantiates a new Singleton. Adds the component to a new GameObject and puts it in the System hierarchy
Public methodStatic memberGetT
Gets a Registered service if it exists
Public methodStatic memberGetFromInterfaceT
Gets a Registered service from its interface type if it exists
Public methodStatic memberGetTotalNumberOfServices
Returns the number of registered services
Public methodStatic memberGetTotalNumberOfServicesReady
Returns the number of registered services that is ready
Public methodStatic memberIsReady(Type)
Checks if registered service is ready
Public methodStatic memberIsReadyT
Checks if registered service is ready
Public methodStatic memberIsReadyFromInterfaceT
Checks if registered service is ready
Public methodStatic memberIterateServices
Iterate over all the services. Note: This method locks, so take care.
Public methodStatic memberPrintWaitedFor
Periodically log to the console while we wait for a service ot be ready
Public methodStatic memberRegisterService(SingletonBehaviour)
Registers a service
Public methodStatic memberRegisterService(Type, SingletonBehaviour)
Registers a service
Public methodStatic memberUnRegisterService
Unregisters a service
Public methodStatic memberWaitForT
Waits for a singleton on a coroutine
Top
Fields
  NameDescription
Public fieldStatic memberIntervalForWaitLoggingInSeconds
Number of whole seconds to wait before logging progress to console
Public fieldStatic memberSystemObjectName
The name of the global GameObject that will hold all the singletons as child objects.
Top
See Also