Pool Boss  V 1.2.1
The ultimate pooling solution!
DarkTonic.PoolBoss.PoolBossExtensions Class Reference

Extension methods of Pool Boss methods, that you can call with one less parameter from the Transform component. More...

Static Public Member Functions

static bool AllOfPrefabAreDespawned (this Transform transPrefab)
 Call this method to find out if all are despawned More...
 
static void CreateNewPoolItem (this Transform itemTrans, int preloadInstances, bool canInstantiateMore, int hardLimit, bool logMsgs, string catName, PoolBoss.PrefabSource prefabSource)
 This method allows you to add a new Pool Item at runtime. More...
 
static bool Despawn (this Transform transToDespawn)
 Call this method to despawn a prefab using Pool Boss. All the Spawners and Killable use this method. More...
 
static void DespawnAllOfPrefab (this Transform transToDespawn)
 This method will despawn all spawned instances of the prefab you pass in. More...
 
static string GetPrefabName (this Transform trans)
 This will return the name of the game object's prefab without "(Clone X)" in the name. It is used internally by PoolBoss for a lot of things. More...
 
static Transform NextPoolItemToSpawn (this Transform trans)
 Call this get the next available item to spawn for a pool item. More...
 
static int PrefabDespawnedCount (this Transform transPrefab)
 This will tell you how many available clones of a prefab are despawned and ready to spawn. A value of -1 indicates an error More...
 
static bool PrefabIsInPool (this Transform trans)
 Call this method determine if the item (Transform) you pass in is set up in Pool Boss. More...
 
static int PrefabSpawnedCount (this Transform transPrefab)
 This will tell you how many clones of a prefab are already spawned out of Pool Boss. A value of -1 indicates an error More...
 
static Transform SpawnInPool (this Transform transToSpawn, Vector3 position, Quaternion rotation)
 Call this method to spawn a prefab using Pool Boss, which will be a child of the Pool Boss prefab. More...
 
static Transform SpawnOutsidePool (this Transform transToSpawn, Vector3 position, Quaternion rotation)
 Call this method to spawn a prefab using Pool Boss, which will be spawned with no parent Transform (outside the pool) More...
 
static Transform Spawn (this Transform transToSpawn, Vector3 position, Quaternion rotation, Transform parentTransform)
 Call this method to spawn a prefab using Pool Boss. All the Spawners and Killable use this method. More...
 
static Transform OnLayer (this Transform spawned, int layer)
 Changes the layer of a just spawned Transform More...
 
static Transform WithScale (this Transform spawned, Vector3 newScale)
 Changes the scale of a spawned Transform More...
 

Detailed Description

Extension methods of Pool Boss methods, that you can call with one less parameter from the Transform component.

Member Function Documentation

static bool DarkTonic.PoolBoss.PoolBossExtensions.AllOfPrefabAreDespawned ( this Transform  transPrefab)
static

Call this method to find out if all are despawned

Parameters
transPrefabThe transform of the prefab you are asking about.
Returns
Boolean value.
static void DarkTonic.PoolBoss.PoolBossExtensions.CreateNewPoolItem ( this Transform  itemTrans,
int  preloadInstances,
bool  canInstantiateMore,
int  hardLimit,
bool  logMsgs,
string  catName,
PoolBoss.PrefabSource  prefabSource 
)
static

This method allows you to add a new Pool Item at runtime.

Parameters
itemTransThe Transform of the item.
preloadInstancesThe number of instances to preload.
canInstantiateMoreCan instantiate more or not
hardLimitItem Hard Limit
logMsgsLog messages during spawn and despawn.
catNameCategory name
prefabSourcePrefab source
static bool DarkTonic.PoolBoss.PoolBossExtensions.Despawn ( this Transform  transToDespawn)
static

Call this method to despawn a prefab using Pool Boss. All the Spawners and Killable use this method.

Parameters
transToDespawnTransform to despawn
Returns
true if despawned
static void DarkTonic.PoolBoss.PoolBossExtensions.DespawnAllOfPrefab ( this Transform  transToDespawn)
static

This method will despawn all spawned instances of the prefab you pass in.

Parameters
transToDespawnTransform component of a prefab
static string DarkTonic.PoolBoss.PoolBossExtensions.GetPrefabName ( this Transform  trans)
static

This will return the name of the game object's prefab without "(Clone X)" in the name. It is used internally by PoolBoss for a lot of things.

Parameters
transThe Transform of the game object
Returns
string
static Transform DarkTonic.PoolBoss.PoolBossExtensions.NextPoolItemToSpawn ( this Transform  trans)
static

Call this get the next available item to spawn for a pool item.

Parameters
transTransform you want to get the next item to spawn for.
Returns
Transform
static Transform DarkTonic.PoolBoss.PoolBossExtensions.OnLayer ( this Transform  spawned,
int  layer 
)
static

Changes the layer of a just spawned Transform

Parameters
spawnedSpawned Transform
layerThe layer
Returns
Transform
static int DarkTonic.PoolBoss.PoolBossExtensions.PrefabDespawnedCount ( this Transform  transPrefab)
static

This will tell you how many available clones of a prefab are despawned and ready to spawn. A value of -1 indicates an error

Parameters
transPrefabThe transform component of the prefab you want the despawned count of.
Returns
Integer value.
static bool DarkTonic.PoolBoss.PoolBossExtensions.PrefabIsInPool ( this Transform  trans)
static

Call this method determine if the item (Transform) you pass in is set up in Pool Boss.

Parameters
transTransform you want to know is in the Pool or not.
Returns
Boolean value.
static int DarkTonic.PoolBoss.PoolBossExtensions.PrefabSpawnedCount ( this Transform  transPrefab)
static

This will tell you how many clones of a prefab are already spawned out of Pool Boss. A value of -1 indicates an error

Parameters
transPrefabThe transform component of the prefab you want the spawned count of.
Returns
Integer value.
static Transform DarkTonic.PoolBoss.PoolBossExtensions.Spawn ( this Transform  transToSpawn,
Vector3  position,
Quaternion  rotation,
Transform  parentTransform 
)
static

Call this method to spawn a prefab using Pool Boss. All the Spawners and Killable use this method.

Parameters
transToSpawnTransform to spawn
positionThe position to spawn it at
rotationThe rotation to use
parentTransformThe parent Transform to use
Returns
The Transform of the spawned object. It can be null if spawning failed from limits you have set.
static Transform DarkTonic.PoolBoss.PoolBossExtensions.SpawnInPool ( this Transform  transToSpawn,
Vector3  position,
Quaternion  rotation 
)
static

Call this method to spawn a prefab using Pool Boss, which will be a child of the Pool Boss prefab.

Parameters
transToSpawnTransform to spawn
positionThe position to spawn it at
rotationThe rotation to use
Returns
The Transform of the spawned object. It can be null if spawning failed from limits you have set.
static Transform DarkTonic.PoolBoss.PoolBossExtensions.SpawnOutsidePool ( this Transform  transToSpawn,
Vector3  position,
Quaternion  rotation 
)
static

Call this method to spawn a prefab using Pool Boss, which will be spawned with no parent Transform (outside the pool)

Parameters
transToSpawnTransform to spawn
positionThe position to spawn it at
rotationThe rotation to use
Returns
The Transform of the spawned object. It can be null if spawning failed from limits you have set.
static Transform DarkTonic.PoolBoss.PoolBossExtensions.WithScale ( this Transform  spawned,
Vector3  newScale 
)
static

Changes the scale of a spawned Transform

Parameters
spawnedSpawned Transform
newScaleNew scale to use
Returns
Transform

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