A utility component to make an object persist across different scenes in a Unity project. Inherits from IdentifierUtility to ensure each undestroyable object has a unique identifier. This class avoids duplication of persistent objects across scene loads by maintaining a registry of active instances. If an object with the same ID is found upon scene load, the duplicate is destroyed. More...
Protected Member Functions | |
| virtual void | Awake () |
| Initializes the component during Unity's Awake callback. | |
| virtual void | OnDisable () |
| Handles the Unity disable callback. | |
| virtual void | OnApplicationQuit () |
| Handles application shutdown. | |
Properties | |
| bool | IsDestroyed [get] |
| Indicates whether the object has been destroyed. It becomes true if the object is explicitly destroyed. | |
| Properties inherited from SCG.SpaceAdMobile.IdentifierUtility | |
| virtual string | Id [get, protected set] |
| The unique identifier for the object instance. It is serialized and can be viewed and modified in the Unity Editor. | |
A utility component to make an object persist across different scenes in a Unity project. Inherits from IdentifierUtility to ensure each undestroyable object has a unique identifier. This class avoids duplication of persistent objects across scene loads by maintaining a registry of active instances. If an object with the same ID is found upon scene load, the duplicate is destroyed.
Definition at line 14 of file UndestroyableUtility.cs.