Skip to main content

PooledObjectSoundHook

A class in Root.Township, the global namespace.

Plays a sound at this position each time its pooled object is taken from the pool.

Constructors​

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

Fields​

2 private and internal fields
MemberWhat it is
private PooledObject pooledObjectThe pooled object on this game object.
private SoundEffectSet soundEffectSetSound to play.

Methods​

2 private and internal methods
MemberWhat it is
private void Awake()Hooks the pooled object's Requested event.
private void PlayEffect(PooledObject pooledObject)Plays soundEffectSet at this position.