C# Class Fungus.FungusManager

Inheritance: UnityEngine.MonoBehaviour
Show file Open project: snozbot/fungus Class Usage Examples

Private Methods

Method Description
Awake ( ) : void
OnDestroy ( ) : void

When Unity quits, it destroys objects in a random order. In principle, a Singleton is only destroyed when application quits. If any script calls Instance after it have been destroyed, it will create a buggy ghost object that will stay on the Editor scene even after stopping playing the Application. Really bad! So, this was made to be sure we're not creating that buggy ghost object.