My Project
 All Classes Namespaces Files Functions Variables Enumerations Enumerator Properties
Public Member Functions | List of all members
UniExtensions.Resource.PrefabPool Class Reference

Prefab pool. Used for recyling tather than Instantiate/Destroy. More...

Public Member Functions

 PrefabPool (GameObject prefab, int count)
 Initializes a new pool of empty objects, and adds the T component to them. More...
 
GameObject Take (Vector3 position, Quaternion rotation)
 Take an object from the pool and set the position and rotation. More...
 
GameObject Take ()
 Take an object from the pool. More...
 
void Recycle (GameObject g)
 Place an object back into the pool. More...
 

Detailed Description

Prefab pool. Used for recyling tather than Instantiate/Destroy.

Constructor & Destructor Documentation

UniExtensions.Resource.PrefabPool.PrefabPool ( GameObject  prefab,
int  count 
)
inline

Initializes a new pool of empty objects, and adds the T component to them.

Parameters
countCount.

Member Function Documentation

void UniExtensions.Resource.PrefabPool.Recycle ( GameObject  g)
inline

Place an object back into the pool.

Parameters
gG.
GameObject UniExtensions.Resource.PrefabPool.Take ( Vector3  position,
Quaternion  rotation 
)
inline

Take an object from the pool and set the position and rotation.

Parameters
positionPosition.
rotationRotation.
GameObject UniExtensions.Resource.PrefabPool.Take ( )
inline

Take an object from the pool.


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