C# Class Pooler, Geewhiz

Inheritance: MonoBehaviour
Mostra file Open project: tosos/Geewhiz Class Usage Examples

Public Properties

Property Type Description
minPooledIds int
poolablePrefabs Transform[]

Public Methods

Method Description
Awake ( ) : void
GetPrefab ( Transform inst ) : Transform
InstantiateFromPool ( Transform prefab, Vector3 pos, Quaternion rot ) : Transform
NetworkInstantiateFromPool ( Transform prefab, Vector3 pos, Quaternion rot, NetworkConnection authority = null ) : Transform
OnDestroy ( ) : void
ReturnToPool ( Transform instance, float time = 0.0f ) : void

Private Methods

Method Description
DelayedReturn ( Transform instance ) : IEnumerator
InstantiateInternal ( int index, string tag, int layer, Vector3 pos, Quaternion rot ) : Transform
PrefabIndex ( Transform prefab ) : int
ReceiveRemoteInstanceFromClient ( NetworkMessage, msg ) : void
ReceiveRemoteInstanceFromServer ( NetworkMessage, msg ) : void
RemoteInstance ( NetworkConnection conn, RemoteInstanceMessage msg ) : void
SendPoolInstantiated ( Transform inst ) : IEnumerator
SendRemoteInstanceToClients ( int index, string tag, int layer, Vector3 pos, Quaternion rot ) : void
SendRemoteInstanceToServer ( int index, string tag, int layer, Vector3 pos, Quaternion rot ) : void
SpawnPoolable ( Vector3 position, NetworkHash128 assetId ) : GameObject
TimedReturn ( Transform instance, float time ) : IEnumerator
UnspawnPoolable ( GameObject go ) : void

Method Details

Awake() public method

public Awake ( ) : void
return void

GetPrefab() public method

public GetPrefab ( Transform inst ) : Transform
inst Transform
return Transform

InstantiateFromPool() public method

public InstantiateFromPool ( Transform prefab, Vector3 pos, Quaternion rot ) : Transform
prefab Transform
pos Vector3
rot Quaternion
return Transform

NetworkInstantiateFromPool() public method

public NetworkInstantiateFromPool ( Transform prefab, Vector3 pos, Quaternion rot, NetworkConnection authority = null ) : Transform
prefab Transform
pos Vector3
rot Quaternion
authority NetworkConnection
return Transform

OnDestroy() public method

public OnDestroy ( ) : void
return void

ReturnToPool() public method

public ReturnToPool ( Transform instance, float time = 0.0f ) : void
instance Transform
time float
return void

Property Details

minPooledIds public_oe property

public int minPooledIds
return int

poolablePrefabs public_oe property

public Transform[] poolablePrefabs
return Transform[]