UnityToolbox
Brief documentation for all existing scripts.
 
Loading...
Searching...
No Matches
ModuleManager Class Reference

The module manager (de)registeres implementations of the Module. All modules can be called from here, without searching the scene.

Inheritance diagram for ModuleManager:

Static Public Member Functions

static bool RegisterModul< T > (T module)
 Registeres a new Module of type T . Only one Module of its type can be registered.
 
static void DeregisterModul< T > (T module)
 Deregisters a modul.
 
static bool ModuleRegistered< T > ()
 Check whether a Module is registered.
 
static T GetModule< T > ()
 Tries to find a Module of type T .
 
static bool IsLoaded ()
 Check whether the ModuleManager is loaded.
 

Properties

List< ModuleModuls [get]
 

Member Function Documentation

◆ DeregisterModul< T >()

static void ModuleManager.DeregisterModul< T > ( module)
static
Template Parameters
TThe type of the Module to deregister.
Parameters
moduleThe Module to deregister.
Type Constraints
T :Module 

References Moduls.

◆ GetModule< T >()

static T ModuleManager.GetModule< T > ( )
static
Template Parameters
TThe type of Module to search for.
Returns
The Module if it is found.
Exceptions
Exception
Type Constraints
T :Module 

References Moduls.

◆ IsLoaded()

static bool ModuleManager.IsLoaded ( )
static
Returns
True of the ModuleManager is instantiated.

Referenced by Module.Awake().

◆ ModuleRegistered< T >()

static bool ModuleManager.ModuleRegistered< T > ( )
static
Template Parameters
TThe type of module to search for.
Returns
True if a Module of this type is found.
Type Constraints
T :Module 

References Moduls.

◆ RegisterModul< T >()

static bool ModuleManager.RegisterModul< T > ( module)
static
Template Parameters
TThe type of the Module to register.
Parameters
moduleThe Module to register.
Returns
Type Constraints
T :Module 

References Moduls.

Property Documentation

◆ Moduls

List<Module> ModuleManager.Moduls
get