Hydrogen Framework  1.3.1
 All Classes Namespaces Functions Variables Enumerations Enumerator Properties Events
Hydrogen.Core.ObjectPool Class Reference

An internal pooling system used within the Hydrogen Framework. More...

+ Inheritance diagram for Hydrogen.Core.ObjectPool:

Public Member Functions

int Add (GameObject prefab)
 Add a Prefab or GameObject to the Object Pool. More...
 
int Add (GameObject prefab, int preloadAmount)
 Add a Prefab or GameObject to the Object Pool. More...
 
int Add (GameObject prefab, int preloadAmount, bool spawnMore, bool slowMessage, bool handleParticles, bool trackSpawned, bool cullExtras, float cullInterval)
 Add a Prefab or GameObject to the Object Pool. More...
 
int[] Add (GameObject[] prefabs)
 Add an array of Prefabs or GameObjects to the Object Pool. More...
 
int[] Add (GameObject[] prefabs, int preloadAmount)
 Add an array of Prefabs or GameObjects to the Object Pool. More...
 
int[] Add (GameObject[] prefabs, int preloadAmount, bool spawnMore, bool slowMessage, bool handleParticles, bool trackSpawned, bool cullExtras, float cullInterval)
 Add an array of Prefabs or GameObjects to the Object Pool. More...
 
void Despawn (Transform transform)
 Despawn the specified Transform's GameObject back into it's Object Pool. More...
 
void Despawn (GameObject gameObject)
 Despawn the specified GameObject back into it's Object Pool. More...
 
void Despawn (Transform transform, int poolID)
 Despawn the specified Transform's GameObject back into it's Object Pool. More...
 
void Despawn (GameObject gameObject, int poolID)
 Despawn the specified GameObject back into it's Object Pool. More...
 
int GetPoolID (GameObject gameObject)
 Gets the Pool ID for the GameObject. More...
 
int GetPoolID (string prefabName)
 Gets the Pool ID by name. More...
 
bool Remove (GameObject gameObject, bool destroyImmediate)
 Remove the specified GameObject from it's Object Pool. More...
 
GameObject Spawn (Transform transform)
 Spawn a GameObject from it's Object Pool. More...
 
GameObject Spawn (GameObject gameObject)
 Spawn a GameObject from it's Object Pool. More...
 
GameObject Spawn (Transform transform, Vector3 position, Quaternion rotation)
 Spawn a GameObject from it's Object Pool. More...
 
GameObject Spawn (GameObject gameObject, Vector3 position, Quaternion rotation)
 Spawn a GameObject from it's Object Pool. More...
 
GameObject Spawn (int poolID)
 Spawn a GameObject from it's Object Pool. More...
 
GameObject Spawn (int poolID, Vector3 position, Quaternion rotation)
 Spawn a GameObject from it's Object Pool. More...
 

Public Attributes

bool CullExtras
 Should extra objects be culled when not in use? More...
 
float CullInterval = 3f
 How often should we look at culling extra objects. More...
 
bool HandleParticles = true
 Should particle systems be appropriately handled when despawning? More...
 
ObjectPoolCollection[] ObjectPools
 Our pooled object collections. More...
 
int PreloadAmount = 5
 The number of objects to preload in an Object Pool. More...
 
bool SlowMessage
 Should Unity's SendMessage be used. (OnSpawned, WaitToDespawn, OnDespawned) More...
 
bool SpawnMore = true
 Should additional objects be spawned as needed? More...
 
bool TrackObjects
 Should objects be tracked when they are spawned? More...
 

Protected Member Functions

virtual void Awake ()
 Unity's Awake Event More...
 
virtual void Update ()
 Unity's Update Event More...
 

Detailed Description

An internal pooling system used within the Hydrogen Framework.

Each GameObject / Prefab has its own pool, this is done for many reasons, but ultimately seems to be the best performance scenario.

Definition at line 41 of file ObjectPool.cs.

Member Function Documentation

int Hydrogen.Core.ObjectPool.Add ( GameObject  prefab)

Add a Prefab or GameObject to the Object Pool.

Returns
The index (Pool ID) of the newly created pool, or if a pool already exists, return its index.

If you pass an existing GameObject from the scene, it will need to exist in the future to be able to spawn any additional objects outside of what was preloaded upon its addition to the Object Pool. It can be disabled, or inactive, it simply needs to exist if you want to add more later.

Parameters
prefabThe Prefab or GameObject.

Definition at line 117 of file ObjectPool.cs.

118  {
121  }
bool SpawnMore
Should additional objects be spawned as needed?
Definition: ObjectPool.cs:91
float CullInterval
How often should we look at culling extra objects.
Definition: ObjectPool.cs:56
bool TrackObjects
Should objects be tracked when they are spawned?
Definition: ObjectPool.cs:99
int PreloadAmount
The number of objects to preload in an Object Pool.
Definition: ObjectPool.cs:77
bool HandleParticles
Should particle systems be appropriately handled when despawning?
Definition: ObjectPool.cs:63
bool SlowMessage
Should Unity's SendMessage be used. (OnSpawned, WaitToDespawn, OnDespawned)
Definition: ObjectPool.cs:84
bool CullExtras
Should extra objects be culled when not in use?
Definition: ObjectPool.cs:49
int Add(GameObject prefab)
Add a Prefab or GameObject to the Object Pool.
Definition: ObjectPool.cs:117
int Hydrogen.Core.ObjectPool.Add ( GameObject  prefab,
int  preloadAmount 
)

Add a Prefab or GameObject to the Object Pool.

Returns
The index (Pool ID) of the newly created pool, or if a pool already exists, return its index.

If you pass an existing GameObject from the scene, it will need to exist in the future to be able to spawn any additional objects outside of what was preloaded upon its addition to the Object Pool. It can be disabled, or inactive, it simply needs to exist if you want to add more later.

Parameters
prefabThe Prefab or GameObject.
preloadAmountThe number of objects that should be preloaded.

Definition at line 136 of file ObjectPool.cs.

137  {
138  return Add (prefab, preloadAmount, SpawnMore, SlowMessage, HandleParticles, TrackObjects,
140  }
bool SpawnMore
Should additional objects be spawned as needed?
Definition: ObjectPool.cs:91
float CullInterval
How often should we look at culling extra objects.
Definition: ObjectPool.cs:56
bool TrackObjects
Should objects be tracked when they are spawned?
Definition: ObjectPool.cs:99
bool HandleParticles
Should particle systems be appropriately handled when despawning?
Definition: ObjectPool.cs:63
bool SlowMessage
Should Unity's SendMessage be used. (OnSpawned, WaitToDespawn, OnDespawned)
Definition: ObjectPool.cs:84
bool CullExtras
Should extra objects be culled when not in use?
Definition: ObjectPool.cs:49
int Add(GameObject prefab)
Add a Prefab or GameObject to the Object Pool.
Definition: ObjectPool.cs:117
int Hydrogen.Core.ObjectPool.Add ( GameObject  prefab,
int  preloadAmount,
bool  spawnMore,
bool  slowMessage,
bool  handleParticles,
bool  trackSpawned,
bool  cullExtras,
float  cullInterval 
)

Add a Prefab or GameObject to the Object Pool.

Returns
The index (Pool ID) of the newly created pool, or if a pool already exists, return its index.

If you pass an existing GameObject from the scene, it will need to exist in the future to be able to spawn any additional objects outside of what was preloaded upon its addition to the Object Pool. It can be disabled, or inactive, it simply needs to exist if you want to add more later.

Parameters
prefabThe Prefab or GameObject.
preloadAmountThe number of objects that should be preloaded.
spawnMoreShould more objects be added to the pool as needed?
slowMessageShould Unity's SendMessage be used?
handleParticlesShould accomodations for Particles be made?
trackSpawnedShould spawned objects be tracked?
cullExtrasShould extra objects be removed from the Object Pool when not in use?
cullIntervalHow often should we check for extras to cull.

Definition at line 161 of file ObjectPool.cs.

163  {
164  if (prefab == null) {
165  throw new MissingReferenceException ("You are passing a null gameObject reference to hObjectPool.Instance.Add()");
166  }
167 
168  var tempLookup = GetPoolID (prefab.name);
169  if (tempLookup == -1) {
170  var newPool = new ObjectPoolCollection (preloadAmount, spawnMore, slowMessage,
171  handleParticles, trackSpawned, cullExtras, cullInterval);
172  newPool.Initialize (prefab, transform, ObjectPools.Length);
173  Array.Add<ObjectPoolCollection> (ref ObjectPools, newPool, false);
174  if (_poolStringLookupTable == null)
175  _poolStringLookupTable = new Dictionary<string, int> ();
176  _poolStringLookupTable.Add (newPool.Prefab.name, ObjectPools.Length - 1);
177  return ObjectPools.Length - 1;
178  }
179  return tempLookup;
180  }
int GetPoolID(GameObject gameObject)
Gets the Pool ID for the GameObject.
Definition: ObjectPool.cs:300
ObjectPoolCollection[] ObjectPools
Our pooled object collections.
Definition: ObjectPool.cs:70
int [] Hydrogen.Core.ObjectPool.Add ( GameObject[]  prefabs)

Add an array of Prefabs or GameObjects to the Object Pool.

Returns
An array of indexs (Pool IDs) of the newly created pools, or if pools already exists, use their indexes.

If you pass an existing GameObject from the scene, it will need to exist in the future to be able to spawn any additional objects outside of what was preloaded upon its addition to the Object Pool. It can be disabled, or inactive, it simply needs to exist if you want to add more later.

Parameters
prefabsAn array of Prefabs or GameObjects.

Definition at line 194 of file ObjectPool.cs.

195  {
198  }
bool SpawnMore
Should additional objects be spawned as needed?
Definition: ObjectPool.cs:91
float CullInterval
How often should we look at culling extra objects.
Definition: ObjectPool.cs:56
bool TrackObjects
Should objects be tracked when they are spawned?
Definition: ObjectPool.cs:99
int PreloadAmount
The number of objects to preload in an Object Pool.
Definition: ObjectPool.cs:77
bool HandleParticles
Should particle systems be appropriately handled when despawning?
Definition: ObjectPool.cs:63
bool SlowMessage
Should Unity&#39;s SendMessage be used. (OnSpawned, WaitToDespawn, OnDespawned)
Definition: ObjectPool.cs:84
bool CullExtras
Should extra objects be culled when not in use?
Definition: ObjectPool.cs:49
int Add(GameObject prefab)
Add a Prefab or GameObject to the Object Pool.
Definition: ObjectPool.cs:117
int [] Hydrogen.Core.ObjectPool.Add ( GameObject[]  prefabs,
int  preloadAmount 
)

Add an array of Prefabs or GameObjects to the Object Pool.

Returns
An array of indexs (Pool IDs) of the newly created pools, or if pools already exists, use their indexes.

If you pass an existing GameObject from the scene, it will need to exist in the future to be able to spawn any additional objects outside of what was preloaded upon its addition to the Object Pool. It can be disabled, or inactive, it simply needs to exist if you want to add more later.

Parameters
prefabsAn array of Prefabs or GameObjects.
preloadAmountThe number of objects that should be preloaded.

Definition at line 213 of file ObjectPool.cs.

214  {
215  return Add (prefabs, preloadAmount, SpawnMore, SlowMessage, HandleParticles, TrackObjects,
217  }
bool SpawnMore
Should additional objects be spawned as needed?
Definition: ObjectPool.cs:91
float CullInterval
How often should we look at culling extra objects.
Definition: ObjectPool.cs:56
bool TrackObjects
Should objects be tracked when they are spawned?
Definition: ObjectPool.cs:99
bool HandleParticles
Should particle systems be appropriately handled when despawning?
Definition: ObjectPool.cs:63
bool SlowMessage
Should Unity&#39;s SendMessage be used. (OnSpawned, WaitToDespawn, OnDespawned)
Definition: ObjectPool.cs:84
bool CullExtras
Should extra objects be culled when not in use?
Definition: ObjectPool.cs:49
int Add(GameObject prefab)
Add a Prefab or GameObject to the Object Pool.
Definition: ObjectPool.cs:117
int [] Hydrogen.Core.ObjectPool.Add ( GameObject[]  prefabs,
int  preloadAmount,
bool  spawnMore,
bool  slowMessage,
bool  handleParticles,
bool  trackSpawned,
bool  cullExtras,
float  cullInterval 
)

Add an array of Prefabs or GameObjects to the Object Pool.

Returns
An array of indexs (Pool IDs) of the newly created pools, or if pools already exists, use their indexes.

If you pass an existing GameObject from the scene, it will need to exist in the future to be able to spawn any additional objects outside of what was preloaded upon its addition to the Object Pool. It can be disabled, or inactive, it simply needs to exist if you want to add more later.

Parameters
prefabsAn array of Prefabs or GameObjects.
preloadAmountThe number of objects that should be preloaded.
spawnMoreShould more objects be added to the pool as needed?
slowMessageShould Unity's SendMessage be used?
handleParticlesShould accomodations for Particles be made?
trackSpawnedShould spawned objects be tracked?
cullExtrasShould extra objects be removed from the Object Pool when not in use?
cullIntervalHow often should we check for extras to cull.

Definition at line 238 of file ObjectPool.cs.

240  {
241  var returnIDs = new int[prefabs.Length];
242 
243  for (int x = 0; x < prefabs.Length; x++) {
244  returnIDs [x] = Add (prefabs [x], preloadAmount, spawnMore, slowMessage, handleParticles,
245  trackSpawned, cullExtras, cullInterval);
246  }
247 
248  return returnIDs;
249  }
int Add(GameObject prefab)
Add a Prefab or GameObject to the Object Pool.
Definition: ObjectPool.cs:117
virtual void Hydrogen.Core.ObjectPool.Awake ( )
protectedvirtual

Unity's Awake Event

Reimplemented in hObjectPool.

Definition at line 415 of file ObjectPool.cs.

416  {
417  if (ObjectPools == null)
418  ObjectPools = new ObjectPoolCollection[0];
419  if (_poolStringLookupTable == null)
420  _poolStringLookupTable = new Dictionary<string, int> ();
421 
422  for (int x = 0; x < ObjectPools.Length; x++) {
423 
424  if (ObjectPools [x].Prefab == null) {
425  throw new MissingReferenceException ("You have not set the prefab in the hObjectPool Inspector for Object Pools->Element " + x);
426  }
427 
428  if (!ObjectPools [x].Initialized) {
429  ObjectPools [x].Initialize (ObjectPools [x].Prefab, transform, x);
430  _poolStringLookupTable.Add (ObjectPools [x].Prefab.name, x);
431  }
432  }
433  }
ObjectPoolCollection[] ObjectPools
Our pooled object collections.
Definition: ObjectPool.cs:70
void Hydrogen.Core.ObjectPool.Despawn ( Transform  transform)

Despawn the specified Transform's GameObject back into it's Object Pool.

This method should only be used if the Pool ID is not known.

Parameters
transformTarget Transform

Definition at line 258 of file ObjectPool.cs.

259  {
260  Despawn (transform.gameObject, GetPoolID (gameObject.name));
261  }
void Despawn(Transform transform)
Despawn the specified Transform&#39;s GameObject back into it&#39;s Object Pool.
Definition: ObjectPool.cs:258
int GetPoolID(GameObject gameObject)
Gets the Pool ID for the GameObject.
Definition: ObjectPool.cs:300
void Hydrogen.Core.ObjectPool.Despawn ( GameObject  gameObject)

Despawn the specified GameObject back into it's Object Pool.

This method should only be used if the Pool ID is not known.

Parameters
gameObjectTarget GameObject.

Definition at line 270 of file ObjectPool.cs.

271  {
272  Despawn (gameObject, GetPoolID (gameObject.name));
273  }
void Despawn(Transform transform)
Despawn the specified Transform&#39;s GameObject back into it&#39;s Object Pool.
Definition: ObjectPool.cs:258
int GetPoolID(GameObject gameObject)
Gets the Pool ID for the GameObject.
Definition: ObjectPool.cs:300
void Hydrogen.Core.ObjectPool.Despawn ( Transform  transform,
int  poolID 
)

Despawn the specified Transform's GameObject back into it's Object Pool.

Parameters
transformTarget Transform.
poolIDThe Pool ID

Definition at line 280 of file ObjectPool.cs.

281  {
282  ObjectPools [poolID].Despawn (transform.gameObject);
283  }
ObjectPoolCollection[] ObjectPools
Our pooled object collections.
Definition: ObjectPool.cs:70
void Hydrogen.Core.ObjectPool.Despawn ( GameObject  gameObject,
int  poolID 
)

Despawn the specified GameObject back into it's Object Pool.

Parameters
gameObjectTarget GameObject
poolIDThe Pool ID

Definition at line 290 of file ObjectPool.cs.

291  {
292  ObjectPools [poolID].Despawn (gameObject);
293  }
ObjectPoolCollection[] ObjectPools
Our pooled object collections.
Definition: ObjectPool.cs:70
int Hydrogen.Core.ObjectPool.GetPoolID ( GameObject  gameObject)

Gets the Pool ID for the GameObject.

Returns
The Pool ID, -1 if not found.
Parameters
gameObjectTarget GameObject.

Definition at line 300 of file ObjectPool.cs.

301  {
302  return GetPoolID (gameObject.name);
303  }
int GetPoolID(GameObject gameObject)
Gets the Pool ID for the GameObject.
Definition: ObjectPool.cs:300
int Hydrogen.Core.ObjectPool.GetPoolID ( string  prefabName)

Gets the Pool ID by name.

Returns
The Pool ID, -1 if not found.
Parameters
prefabNameLookup Name

Definition at line 310 of file ObjectPool.cs.

311  {
312  if (string.IsNullOrEmpty (prefabName)) {
313  throw new MissingReferenceException (
314  "You are passing a null or empty prefabName to hObjectPool.Instance.GetPoolID()");
315  }
316  if (_poolStringLookupTable == null)
317  return -1;
318 
319  return _poolStringLookupTable.ContainsKey (prefabName) ? _poolStringLookupTable [prefabName] : -1;
320  }
bool Hydrogen.Core.ObjectPool.Remove ( GameObject  gameObject,
bool  destroyImmediate 
)

Remove the specified GameObject from it's Object Pool.

Parameters
gameObjectTarget GameObject
destroyImmediateShould the object be destroied immediately.

Definition at line 327 of file ObjectPool.cs.

328  {
329  var tempLookup = GetPoolID (gameObject.name);
330  if (tempLookup != -1) {
331  // Remove object from lookup table
332  _poolStringLookupTable.Remove (gameObject.name);
333 
334  // Remove from pooling system
335  return ObjectPools [tempLookup].RemoveFromPool (gameObject, destroyImmediate);
336  }
337  return false;
338  }
int GetPoolID(GameObject gameObject)
Gets the Pool ID for the GameObject.
Definition: ObjectPool.cs:300
ObjectPoolCollection[] ObjectPools
Our pooled object collections.
Definition: ObjectPool.cs:70
GameObject Hydrogen.Core.ObjectPool.Spawn ( Transform  transform)

Spawn a GameObject from it's Object Pool.

This method is slower then using Spawn(PoolID), as it is doing a lookup.

Parameters
transformTarget Transform.

Definition at line 347 of file ObjectPool.cs.

348  {
349  return ObjectPools [GetPoolID (transform.gameObject.name)].Spawn (Vector3.zero, Quaternion.identity);
350  }
int GetPoolID(GameObject gameObject)
Gets the Pool ID for the GameObject.
Definition: ObjectPool.cs:300
ObjectPoolCollection[] ObjectPools
Our pooled object collections.
Definition: ObjectPool.cs:70
GameObject Hydrogen.Core.ObjectPool.Spawn ( GameObject  gameObject)

Spawn a GameObject from it's Object Pool.

This method is slower then using Spawn(PoolID), as it is doing a lookup.

Parameters
gameObjectTarget GameObject.

Definition at line 359 of file ObjectPool.cs.

360  {
361  return ObjectPools [GetPoolID (gameObject.name)].Spawn (Vector3.zero, Quaternion.identity);
362  }
int GetPoolID(GameObject gameObject)
Gets the Pool ID for the GameObject.
Definition: ObjectPool.cs:300
ObjectPoolCollection[] ObjectPools
Our pooled object collections.
Definition: ObjectPool.cs:70
GameObject Hydrogen.Core.ObjectPool.Spawn ( Transform  transform,
Vector3  position,
Quaternion  rotation 
)

Spawn a GameObject from it's Object Pool.

This method is slower then using Spawn(PoolID), as it is doing a lookup.

Parameters
transformTarget Transform.
positionPosition at which to spawn GameObject.
rotationThe rotation to set for the spawned GameObject.

Definition at line 373 of file ObjectPool.cs.

374  {
375  return ObjectPools [GetPoolID (transform.gameObject.name)].Spawn (position, rotation);
376  }
int GetPoolID(GameObject gameObject)
Gets the Pool ID for the GameObject.
Definition: ObjectPool.cs:300
ObjectPoolCollection[] ObjectPools
Our pooled object collections.
Definition: ObjectPool.cs:70
GameObject Hydrogen.Core.ObjectPool.Spawn ( GameObject  gameObject,
Vector3  position,
Quaternion  rotation 
)

Spawn a GameObject from it's Object Pool.

This method is slower then using Spawn(PoolID), as it is doing a lookup.

Parameters
gameObjectTarget GameObject.
positionPosition at which to spawn GameObject.
rotationThe rotation to set for the spawned GameObject.

Definition at line 387 of file ObjectPool.cs.

388  {
389  return ObjectPools [GetPoolID (gameObject.name)].Spawn (position, rotation);
390  }
int GetPoolID(GameObject gameObject)
Gets the Pool ID for the GameObject.
Definition: ObjectPool.cs:300
ObjectPoolCollection[] ObjectPools
Our pooled object collections.
Definition: ObjectPool.cs:70
GameObject Hydrogen.Core.ObjectPool.Spawn ( int  poolID)

Spawn a GameObject from it's Object Pool.

Parameters
poolIDPool ID of Pool to spawn from.

Definition at line 396 of file ObjectPool.cs.

397  {
398  return ObjectPools [poolID].Spawn (Vector3.zero, Quaternion.identity);
399  }
ObjectPoolCollection[] ObjectPools
Our pooled object collections.
Definition: ObjectPool.cs:70
GameObject Hydrogen.Core.ObjectPool.Spawn ( int  poolID,
Vector3  position,
Quaternion  rotation 
)

Spawn a GameObject from it's Object Pool.

Parameters
poolIDPool ID of Pool to spawn from.
positionPosition at which to spawn GameObject.
rotationThe rotation to set for the spawned GameObject

Definition at line 407 of file ObjectPool.cs.

408  {
409  return ObjectPools [poolID].Spawn (position, rotation);
410  }
ObjectPoolCollection[] ObjectPools
Our pooled object collections.
Definition: ObjectPool.cs:70
virtual void Hydrogen.Core.ObjectPool.Update ( )
protectedvirtual

Unity's Update Event

Definition at line 438 of file ObjectPool.cs.

439  {
440  for (int x = 0; x < ObjectPools.Length; x++) {
441 
443  ObjectPools [x].CullUpdate ();
444  }
445  }
446  }
bool TrackObjects
Should objects be tracked when they are spawned?
Definition: ObjectPool.cs:99
ObjectPoolCollection[] ObjectPools
Our pooled object collections.
Definition: ObjectPool.cs:70
bool CullExtras
Should extra objects be culled when not in use?
Definition: ObjectPool.cs:49

Member Data Documentation

bool Hydrogen.Core.ObjectPool.CullExtras

Should extra objects be culled when not in use?

The default value used when adding objects to the Object Pool.

Definition at line 49 of file ObjectPool.cs.

float Hydrogen.Core.ObjectPool.CullInterval = 3f

How often should we look at culling extra objects.

The default value used when adding objects to the Object Pool.

Definition at line 56 of file ObjectPool.cs.

bool Hydrogen.Core.ObjectPool.HandleParticles = true

Should particle systems be appropriately handled when despawning?

The default value used when adding objects to the Object Pool.

Definition at line 63 of file ObjectPool.cs.

ObjectPoolCollection [] Hydrogen.Core.ObjectPool.ObjectPools

Our pooled object collections.

One for each GameObject / Prefab added to the Object Pool.

Definition at line 70 of file ObjectPool.cs.

int Hydrogen.Core.ObjectPool.PreloadAmount = 5

The number of objects to preload in an Object Pool.

The default value used when adding objects to the Object Pool.

Definition at line 77 of file ObjectPool.cs.

bool Hydrogen.Core.ObjectPool.SlowMessage

Should Unity's SendMessage be used. (OnSpawned, WaitToDespawn, OnDespawned)

The default value used when adding objects to the Object Pool.

Definition at line 84 of file ObjectPool.cs.

bool Hydrogen.Core.ObjectPool.SpawnMore = true

Should additional objects be spawned as needed?

The default value used when adding objects to the Object Pool.

Definition at line 91 of file ObjectPool.cs.

bool Hydrogen.Core.ObjectPool.TrackObjects

Should objects be tracked when they are spawned?

Useful for when you need to keep track of what objects are in use. The default value used when adding objects to the Object Pool.

Definition at line 99 of file ObjectPool.cs.