|
virtual void | OnDestroy () |
| 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.
|
|
Definition at line 7 of file ApexSingleton.cs.
◆ OnDestroy()
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.
Definition at line 72 of file ApexSingleton.cs.
◆ ApplicationIsQuitting
◆ instance
◆ lockObject
◆ Instance
The documentation for this class was generated from the following file: