Arbor 3: FSM & BT Graph Editor  3.7.8
ObjectPool Class Reference

ObjectPool management class More...

Static Public Member Functions

static void AdvancedPool (IEnumerable< PoolingItem > items)
 Pool in advance. More...
 
static Object Instantiate (Object original, Vector3 position, Quaternion rotation)
 Instantiate an object. More...
 
static Object Instantiate (Object original, Vector3 position, Quaternion rotation, Transform parent)
 Instantiate an object. More...
 
static Object Instantiate (Object original)
 Instantiate an object. More...
 
static Object Instantiate (Object original, Transform parent)
 Instantiate an object. More...
 
static Object Instantiate (Object original, Transform parent, bool instantiateInWorldSpace)
 Instantiate an object. More...
 
static T Instantiate< T > (T original)
 Instantiate an object. More...
 
static T Instantiate< T > (T original, Vector3 position, Quaternion rotation)
 Instantiate an object. More...
 
static T Instantiate< T > (T original, Vector3 position, Quaternion rotation, Transform parent)
 Instantiate an object. More...
 
static T Instantiate< T > (T original, Transform parent)
 Instantiate an object. More...
 
static T Instantiate< T > (T original, Transform parent, bool instantiateInWorldSpace)
 Instantiate an object. More...
 
static void Destroy (GameObject gameObject)
 Destroy GameObject. More...
 
static void DestroyImmediate (GameObject gameObject)
 Destroy GameObject immediately. More...
 

Properties

static int advancedRatePerFrame [get, set]
 Advanced Pooling processing frame rate (multiplication factor relative to the screen refresh rate) More...
 
static int advancedFrameRate [get, set]
 Advanced Pooling processing frame rate More...
 
static bool isReady [get]
 Returns whether Advanced pooling is completed. More...
 

Detailed Description

ObjectPool management class

Member Function Documentation

◆ AdvancedPool()

static void AdvancedPool ( IEnumerable< PoolingItem items)
static

Pool in advance.

Parameters
itemsList of objects to pool

◆ Destroy()

static void Destroy ( GameObject  gameObject)
static

Destroy GameObject.

Parameters
gameObjectGameObject to destroy

If it is a GameObject under pool management, return it to the pool.
If it is not under management, it is destroyed by Object.Destroy.

◆ DestroyImmediate()

static void DestroyImmediate ( GameObject  gameObject)
static

Destroy GameObject immediately.

Parameters
gameObjectGameObject to destroy

If it is a GameObject under pool management, return it to the pool.
If it is not under management, it is destroyed by Object.DestroyImmediate.

◆ Instantiate() [1/5]

static Object Instantiate ( Object  original)
static

Instantiate an object.

Parameters
originalOriginal object
Returns
Instantiated object

If there is a pooled object, resume that object.
If there is no pool, it is newly instantiated by Object.Instantiate.

◆ Instantiate() [2/5]

static Object Instantiate ( Object  original,
Transform  parent 
)
static

Instantiate an object.

Parameters
originalOriginal object
parentParent Transform
Returns
Instantiated object

If there is a pooled object, resume that object.
If there is no pool, it is newly instantiated by Object.Instantiate.

◆ Instantiate() [3/5]

static Object Instantiate ( Object  original,
Transform  parent,
bool  instantiateInWorldSpace 
)
static

Instantiate an object.

Parameters
originalOriginal object
parentParent Transform
instantiateInWorldSpaceIf when assigning the parent the original world position should be maintained.
Returns
Instantiated object

If there is a pooled object, resume that object.
If there is no pool, it is newly instantiated by Object.Instantiate.

◆ Instantiate() [4/5]

static Object Instantiate ( Object  original,
Vector3  position,
Quaternion  rotation 
)
static

Instantiate an object.

Parameters
originalOriginal object
positionPosition
rotationRotation
Returns
Instantiated object

If there is a pooled object, resume that object.
If there is no pool, it is newly instantiated by Object.Instantiate.

◆ Instantiate() [5/5]

static Object Instantiate ( Object  original,
Vector3  position,
Quaternion  rotation,
Transform  parent 
)
static

Instantiate an object.

Parameters
originalOriginal object
positionPosition
rotationRotation
parentParent Transform
Returns
Instantiated object

If there is a pooled object, resume that object.
If there is no pool, it is newly instantiated by Object.Instantiate.

◆ Instantiate< T >() [1/5]

static T Instantiate< T > ( original)
static

Instantiate an object.

Template Parameters
TObject type
Parameters
originalOriginal object
Returns
Instantiated object

If there is a pooled object, resume that object.
If there is no pool, it is newly instantiated by Object.Instantiate.

Type Constraints
T :Object 

◆ Instantiate< T >() [2/5]

static T Instantiate< T > ( original,
Transform  parent 
)
static

Instantiate an object.

Template Parameters
TObject type
Parameters
originalOriginal object
parentParent Transform
Returns
Instantiated object

If there is a pooled object, resume that object.
If there is no pool, it is newly instantiated by Object.Instantiate.

Type Constraints
T :Object 

◆ Instantiate< T >() [3/5]

static T Instantiate< T > ( original,
Transform  parent,
bool  instantiateInWorldSpace 
)
static

Instantiate an object.

Template Parameters
TObject type
Parameters
originalOriginal object
parentParent Transform
instantiateInWorldSpaceIf when assigning the parent the original world position should be maintained.
Returns
Instantiated object

If there is a pooled object, resume that object.
If there is no pool, it is newly instantiated by Object.Instantiate.

Type Constraints
T :Object 

◆ Instantiate< T >() [4/5]

static T Instantiate< T > ( original,
Vector3  position,
Quaternion  rotation 
)
static

Instantiate an object.

Template Parameters
TObject type
Parameters
originalOriginal object
positionPosition
rotationRotation
Returns
Instantiated object

If there is a pooled object, resume that object.
If there is no pool, it is newly instantiated by Object.Instantiate.

Type Constraints
T :Object 

◆ Instantiate< T >() [5/5]

static T Instantiate< T > ( original,
Vector3  position,
Quaternion  rotation,
Transform  parent 
)
static

Instantiate an object.

Template Parameters
TObject type
Parameters
originalOriginal object
positionPosition
rotationRotation
parentParent Transform
Returns
Instantiated object

If there is a pooled object, resume that object.
If there is no pool, it is newly instantiated by Object.Instantiate.

Type Constraints
T :Object 

Property Documentation

◆ advancedFrameRate

int advancedFrameRate
staticgetset

Advanced Pooling processing frame rate

If processing time is exceeded beyond this frame rate, it waits until the next frame.
When 0 or less is specified for both advancedFrameRate and advancedRatePerFrame, do not wait until all pools are completed.
The default value is 0.

◆ advancedRatePerFrame

int advancedRatePerFrame
staticgetset

Advanced Pooling processing frame rate (multiplication factor relative to the screen refresh rate)

If processing time is exceeded beyond this frame rate, it waits until the next frame.
The default value is 10.
If 0 or less is specified, use advancedFrameRate.

◆ isReady

bool isReady
staticget

Returns whether Advanced pooling is completed.