Hydrogen Framework
1.3.1
|
The actual pool used by the pooling system, multiple instances of these will be created per unique Prefab or GameObject. More...
Public Member Functions | |
ObjectPoolCollection (int preload, bool spawnMore, bool slowMessage, bool handleParticles, bool trackSpawned, bool cullExtras, float cullInterval) | |
void | AddToPool () |
void | Initialize (GameObject prefab, Transform parent, int poolID) |
void | CullUpdate () |
void | Despawn (GameObject gameObject) |
void | Despawn (GameObject gameObject, bool onSpawn) |
void | DespawnImmediate (GameObject gameObject) |
bool | RemoveFromPool (GameObject gameObject, bool destroyObject) |
GameObject | Spawn () |
Spawn an object from the pool at origin. More... | |
GameObject | Spawn (Vector3 location, Quaternion rotation) |
Spawn an object from the pool at the specified world location and rotation. More... | |
Public Attributes | |
bool | CullExtras |
Should extra objects be culled when not in use? More... | |
float | CullInterval |
How often should we look at culling extra objects. More... | |
bool | DespawnPoolLocation = true |
Should despawned object be returned to it's pool's origin position? More... | |
bool | ManageParticles = true |
Should particle systems be appropriately handled when despawning? More... | |
GameObject | Prefab |
Reference to the Prefab or GameObject used by this Object Pool. More... | |
int | PreloadAmount |
The number of objects to preload in an Object Pool. More... | |
bool | SendMessage |
Should Unity's SendMessage be used. (OnSpawned, WaitToDespawn, OnDespawned) More... | |
bool | SpawnMore |
Should additional objects be spawned as needed? More... | |
bool | TrackObjects |
Should objects be tracked when they are spawned? More... | |
Properties | |
bool | HasObjectPoolItem [get] |
bool | HasRigidbody [get] |
bool | HasParticleSystem [get] |
bool | HasLegacyParticleAnimator [get] |
bool | HasLegacyParticleEmitter [get] |
GameObject[] | SpawnedObjects [get] |
bool | Initialized [get] |
The actual pool used by the pooling system, multiple instances of these will be created per unique Prefab or GameObject.
Definition at line 37 of file ObjectPoolCollection.cs.
Hydrogen.Core.ObjectPoolCollection.ObjectPoolCollection | ( | int | preload, |
bool | spawnMore, | ||
bool | slowMessage, | ||
bool | handleParticles, | ||
bool | trackSpawned, | ||
bool | cullExtras, | ||
float | cullInterval | ||
) |
Definition at line 161 of file ObjectPoolCollection.cs.
void Hydrogen.Core.ObjectPoolCollection.AddToPool | ( | ) |
Definition at line 173 of file ObjectPoolCollection.cs.
void Hydrogen.Core.ObjectPoolCollection.CullUpdate | ( | ) |
Definition at line 216 of file ObjectPoolCollection.cs.
void Hydrogen.Core.ObjectPoolCollection.Despawn | ( | GameObject | gameObject | ) |
Definition at line 234 of file ObjectPoolCollection.cs.
void Hydrogen.Core.ObjectPoolCollection.Despawn | ( | GameObject | gameObject, |
bool | onSpawn | ||
) |
Definition at line 239 of file ObjectPoolCollection.cs.
void Hydrogen.Core.ObjectPoolCollection.DespawnImmediate | ( | GameObject | gameObject | ) |
Definition at line 284 of file ObjectPoolCollection.cs.
void Hydrogen.Core.ObjectPoolCollection.Initialize | ( | GameObject | prefab, |
Transform | parent, | ||
int | poolID | ||
) |
Definition at line 190 of file ObjectPoolCollection.cs.
bool Hydrogen.Core.ObjectPoolCollection.RemoveFromPool | ( | GameObject | gameObject, |
bool | destroyObject | ||
) |
Definition at line 292 of file ObjectPoolCollection.cs.
GameObject Hydrogen.Core.ObjectPoolCollection.Spawn | ( | ) |
Spawn an object from the pool at origin.
Definition at line 306 of file ObjectPoolCollection.cs.
GameObject Hydrogen.Core.ObjectPoolCollection.Spawn | ( | Vector3 | location, |
Quaternion | rotation | ||
) |
Spawn an object from the pool at the specified world location and rotation.
location | Spawn Location |
rotation | Spawn Rotation |
Definition at line 316 of file ObjectPoolCollection.cs.
bool Hydrogen.Core.ObjectPoolCollection.CullExtras |
Should extra objects be culled when not in use?
Definition at line 42 of file ObjectPoolCollection.cs.
float Hydrogen.Core.ObjectPoolCollection.CullInterval |
How often should we look at culling extra objects.
Definition at line 46 of file ObjectPoolCollection.cs.
bool Hydrogen.Core.ObjectPoolCollection.DespawnPoolLocation = true |
Should despawned object be returned to it's pool's origin position?
Definition at line 50 of file ObjectPoolCollection.cs.
bool Hydrogen.Core.ObjectPoolCollection.ManageParticles = true |
Should particle systems be appropriately handled when despawning?
Definition at line 54 of file ObjectPoolCollection.cs.
GameObject Hydrogen.Core.ObjectPoolCollection.Prefab |
Reference to the Prefab or GameObject used by this Object Pool.
Definition at line 58 of file ObjectPoolCollection.cs.
int Hydrogen.Core.ObjectPoolCollection.PreloadAmount |
The number of objects to preload in an Object Pool.
Definition at line 62 of file ObjectPoolCollection.cs.
bool Hydrogen.Core.ObjectPoolCollection.SendMessage |
Should Unity's SendMessage be used. (OnSpawned, WaitToDespawn, OnDespawned)
Definition at line 66 of file ObjectPoolCollection.cs.
bool Hydrogen.Core.ObjectPoolCollection.SpawnMore |
Should additional objects be spawned as needed?
Definition at line 70 of file ObjectPoolCollection.cs.
bool Hydrogen.Core.ObjectPoolCollection.TrackObjects |
Should objects be tracked when they are spawned?
Useful for when you need to keep track of what objects are in use.
Definition at line 77 of file ObjectPoolCollection.cs.
|
get |
Definition at line 141 of file ObjectPoolCollection.cs.
|
get |
Definition at line 147 of file ObjectPoolCollection.cs.
|
get |
Definition at line 123 of file ObjectPoolCollection.cs.
|
get |
Definition at line 135 of file ObjectPoolCollection.cs.
|
get |
Definition at line 129 of file ObjectPoolCollection.cs.
|
get |
Definition at line 155 of file ObjectPoolCollection.cs.
|
get |
Definition at line 153 of file ObjectPoolCollection.cs.