GameObject Pooler
FreakLib.Pooling.OneshotAudioclip Class Reference

This class implements a one-shot AudioClip, that can be used with a Pool. More...

Inheritance diagram for FreakLib.Pooling.OneshotAudioclip:

Detailed Description

This class implements a one-shot AudioClip, that can be used with a Pool.

The class requires that an AudioSource be present on the same GameObject.

Attach this to a prefab set up as a pool item, then use Pool.Borrow on this prefab to play the AudioClip once. It will return itself to the pool once the AudioClip has stopped playing. Note that setting the attached AudioSource to loop will cause it to stay in the scene forever.


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