PoolGen  1.0
Public Member Functions | Static Public Member Functions | Properties | List of all members
PoolPrefab Struct Reference

Data to be used for an object pool More...

Public Member Functions

void TimedDespawn (PoolUser user)
 Despawn a PoolUser after a set amount of time More...
 

Static Public Member Functions

static int GenerateUniqueID (IEnumerable< PoolPrefab > list)
 Generate an ID that hasn't been used in the specified list of PoolPrefab More...
 

Properties

bool Active [get, set]
 Activated status of this PoolPrefab More...
 
bool CanExpand [get, set]
 Allows objects to be pooled past the PoolSize limit. Does not change PoolSize More...
 
int ID [get, set]
 Identification number for this PoolPrefab More...
 
PoolManager.PoolInitializationType InitializationType [get, set]
 Decides when the ObjectPool should be initialized More...
 
bool IsNetworked [get, set]
 Will the object pool use Unity's networking system. This should be set before the object pool is initialized (or before objects are first pooled). More...
 
bool IsPrefabSet [get]
 Is the Prefab object set More...
 
int PoolSize [get, set]
 How many objects should be pooled at the start. Also will be used to decide how many objects that should be kept in the case that more objects are pooled higher than the limit. This value doesn't change when the pool expands using CanExpand. More...
 
GameObject Prefab [get, set]
 The GameObject to be instantiated for the pool More...
 
bool ReuseSpawned [get, set]
 Reuse the oldest spawned object in the pool if the pool is empty More...
 
float TimeToDespawn [get, set]
 Time before automatic despawn More...
 
float Weight [get, set]
 Weight of random chance to be spawned. The higher the weight, the higher the chance. More...
 

Detailed Description

Data to be used for an object pool

Member Function Documentation

static int GenerateUniqueID ( IEnumerable< PoolPrefab list)
static

Generate an ID that hasn't been used in the specified list of PoolPrefab

void TimedDespawn ( PoolUser  user)

Despawn a PoolUser after a set amount of time

Property Documentation

bool Active
getset

Activated status of this PoolPrefab

bool CanExpand
getset

Allows objects to be pooled past the PoolSize limit. Does not change PoolSize

int ID
getset

Identification number for this PoolPrefab

PoolManager.PoolInitializationType InitializationType
getset

Decides when the ObjectPool should be initialized

bool IsNetworked
getset

Will the object pool use Unity's networking system. This should be set before the object pool is initialized (or before objects are first pooled).

bool IsPrefabSet
get

Is the Prefab object set

int PoolSize
getset

How many objects should be pooled at the start. Also will be used to decide how many objects that should be kept in the case that more objects are pooled higher than the limit. This value doesn't change when the pool expands using CanExpand.

GameObject Prefab
getset

The GameObject to be instantiated for the pool

bool ReuseSpawned
getset

Reuse the oldest spawned object in the pool if the pool is empty

float TimeToDespawn
getset

Time before automatic despawn

float Weight
getset

Weight of random chance to be spawned. The higher the weight, the higher the chance.