Arbor 3: FSM & BT Graph Editor 3.7.8

Static Public Member Functions | Properties | List of all members
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

  items | List of objects to pool

## ◆ Destroy()

static void Destroy | ( | GameObject | gameObject | ) |
| static

Destroy GameObject.

Parameters

  gameObject | GameObject 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

  gameObject | GameObject 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

  original | Original 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

  original | Original object
  parent | Parent 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

  original | Original object
  parent | Parent Transform
  instantiateInWorldSpace | If 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

  original | Original object
  position | Position
  rotation | Rotation

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

  original | Original object
  position | Position
  rotation | Rotation
  parent | Parent 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 > | ( | T | original | ) |
| static

Instantiate an object.

Template Parameters

  T | Object type

Parameters

  original | Original 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 > | ( | T | original,
|  | Transform | parent
| ) |  |
| static

Instantiate an object.

Template Parameters

  T | Object type

Parameters

  original | Original object
  parent | Parent 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 > | ( | T | original,
|  | Transform | parent,
|  | bool | instantiateInWorldSpace
| ) |  |
| static

Instantiate an object.

Template Parameters

  T | Object type

Parameters

  original | Original object
  parent | Parent Transform
  instantiateInWorldSpace | If 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 > | ( | T | original,
|  | Vector3 | position,
|  | Quaternion | rotation
| ) |  |
| static

Instantiate an object.

Template Parameters

  T | Object type

Parameters

  original | Original object
  position | Position
  rotation | Rotation

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 > | ( | T | original,
|  | Vector3 | position,
|  | Quaternion | rotation,
|  | Transform | parent
| ) |  |
| static

Instantiate an object.

Template Parameters

  T | Object type

Parameters

  original | Original object
  position | Position
  rotation | Rotation
  parent | Parent 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
| static get set

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
| static get set

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
| static get

Returns whether Advanced pooling is completed.