Skip to main content

RandomScalePooledObject

A class in Root.Township, the global namespace.

Gives a pooled object a random scale each time it's taken from the pool.

Constructors​

MemberWhat it is
RandomScalePooledObject()Unity makes components itself; use AddComponent or spawn a prefab instead of new.

Fields​

3 private and internal fields
MemberWhat it is
private bool isUniformUse one random value for all axes.
private float maximumScaleLargest scale.
private float minimumScaleSmallest scale.

Methods​

2 private and internal methods
MemberWhat it is
private void Awake()Hooks the pooled object's Requested event.
private void SetScale(PooledObject pooledObject)Sets a random local scale, uniform or per axis.