class MAGES::Analytics::AnalyticsUtilities¶
Overview¶
Class containing utility functions for the Analytics module. More…
class AnalyticsUtilities { public: // enums enum Hook; // methods static ListGetActiveActions(); static GameObject Spawn(GameObject prefab); static void Destroy(GameObject prefab); static void AttachCallback(this GameObject g, Hook hook, UnityAction callback); static void AttachCallback( this GameObject g, Hook hook, UnityAction > callback ); static void DetachCallback( Hook hook, GameObject g, UnityAction > callback ); static GameObject SpawnInteractor(GameObject prefab); static void DestroyInteractor(GameObject prefab); };
Detailed Documentation¶
Class containing utility functions for the Analytics module.
Methods¶
static ListGetActiveActions()
Finds all the currently active actions and returns their names.
Returns:
A list containing the names of all the currently active actions.
static GameObject Spawn(GameObject prefab)
Spawns the given prefab.
Parameters:
prefab |
The prefab to spawn. |
Returns:
The instantiated prefab.
static void Destroy(GameObject prefab)
Destroys the given prefab.
Parameters:
prefab |
The prefab to destroy. |
static void AttachCallback(this GameObject g, Hook hook, UnityAction callback)
Attaches the given callback to the given hook for the given gameobject.
Parameters:
g |
The gameobject that is associated with the hook. |
hook |
The type of hook. |
callback |
The callback to attach to the hook. |
static void AttachCallback( this GameObject g, Hook hook, UnityAction> callback )
Attaches the given callback to the given hook for the given gameobject.
Parameters:
g |
The gameobject that is associated with the hook. |
hook |
The type of hook. |
callback |
The callback to attach to the hook. |
static void DetachCallback( Hook hook, GameObject g, UnityAction> callback )
Detaches the given callback from the given hook for the given game object.
Parameters:
hook |
The type of hook. |
g |
The gameobject that is associated with the hook. |
callback |
The callback to detach from the hook. |
static GameObject SpawnInteractor(GameObject prefab)
Handles the spawning of interactors.
Parameters:
prefab |
The interactor prefab. |
Returns:
The spawned interactor.
static void DestroyInteractor(GameObject prefab)
Handles the destruction of interactors.
Parameters:
prefab |
The interactor to be destroyed. |