Twoorb Plugins  1.0
 All Classes Namespaces Functions Variables Enumerations Enumerator Properties
Twoorb.PrefabSystem.IPrefabService Interface Reference

Interface for a prefab service that will be used at runtime. A prefab service will implement these methods and return an instantiated game object based on the information received in the parameters. Can be used for retrieving local and remote prefabs. More...

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

Public Member Functions

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...
 

Detailed Description

Interface for a prefab service that will be used at runtime. A prefab service will implement these methods and return an instantiated game object based on the information received in the parameters. Can be used for retrieving local and remote prefabs.

Member Function Documentation

void Twoorb.PrefabSystem.IPrefabService.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

Implemented in Twoorb.PrefabSystem.PrefabService.

Type Constraints
T :Component 
void Twoorb.PrefabSystem.IPrefabService.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

Implemented in Twoorb.PrefabSystem.PrefabService.


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