Twoorb Plugins  1.0
 All Classes Namespaces Functions Variables Enumerations Enumerator Properties
Twoorb.PrefabSystem.PrefabService Class Reference

The prefab service. It handles, loads and unloads the references to remote and local prefabs. More...

Inheritance diagram for Twoorb.PrefabSystem.PrefabService:
Twoorb.PrefabSystem.IPrefabService

Public Member Functions

void Initialize ()
 Initializes the Prefab Service More...
 
void GetGameObject< T > (string uniqueID, Action< T > onObjectInitialized, Action< bool > onDone=null)
 Gets and instantiates a prefab with the uniqueID and returns the specified component. More...
 
void ReleaseGameObject (string uniqueID, Component obj, Action< bool > eventHandler)
 Returns the instantiated object to the prefab service. This can be useful if the prefab service is handling asset bundles. More...
 
List< string > GetContentGroup (string contentGroup)
 Gets the list of ids in a content group More...
 

Detailed Description

The prefab service. It handles, loads and unloads the references to remote and local prefabs.

Member Function Documentation

List<string> Twoorb.PrefabSystem.PrefabService.GetContentGroup ( string  contentGroup)

Gets the list of ids in a content group

Parameters
contentGroupthe name of the group
Returns
The list of prefab IDs in the content group. Returns null if not found
void Twoorb.PrefabSystem.PrefabService.GetGameObject< T > ( string  uniqueID,
Action< T >  onObjectInitialized,
Action< bool >  onDone = null 
)

Gets and instantiates a prefab with the uniqueID and returns the specified component.

Template Parameters
TThe type of the component that can be found in the prefab
Parameters
uniqueIDThe unique ID of the prefab
onObjectInitializedCallback when the object is initialized. Returns the desired component
onDoneCallback when the operation is done

Implements Twoorb.PrefabSystem.IPrefabService.

Type Constraints
T :Component 
void Twoorb.PrefabSystem.PrefabService.Initialize ( )

Initializes the Prefab Service

void Twoorb.PrefabSystem.PrefabService.ReleaseGameObject ( string  uniqueID,
Component  obj,
Action< bool >  eventHandler 
)

Returns the instantiated object to the prefab service. This can be useful if the prefab service is handling asset bundles.

Parameters
uniqueIDThe uniqueID of the prefab
objThe instantiated object
eventHandlerCallback returning the success of the operation

Implements Twoorb.PrefabSystem.IPrefabService.


The documentation for this class was generated from the following file: