◆ Awake()
| virtual void IuvoUnity.Singletons.PersistentSingleton< T >.Awake |
( |
| ) |
|
|
protectedvirtual |
◆ InitializeSingleton()
| virtual void IuvoUnity.Singletons.PersistentSingleton< T >.InitializeSingleton |
( |
| ) |
|
|
protectedvirtual |
41 {
42 if (!Application.isPlaying)
43 {
44 return;
45 }
46
47 if (UnparentOnAwake)
48 {
49 transform.SetParent(null);
50 }
51
52 if (instance == null)
53 {
54 instance = this as T;
55 DontDestroyOnLoad(transform.gameObject);
56 enabled = true;
57 }
58 else
59 {
60 if (this != instance)
61 {
62 Destroy(this.gameObject);
63 }
64 }
65 }
References instance, and UnparentOnAwake.
Referenced by Awake().
◆ instance
| T IuvoUnity.Singletons.PersistentSingleton< T >.instance |
|
staticprotected |
◆ UnparentOnAwake
| bool IuvoUnity.Singletons.PersistentSingleton< T >.UnparentOnAwake = true |
◆ Current
| T IuvoUnity.Singletons.PersistentSingleton< T >.Current |
|
staticget |
◆ HasInstance
| bool IuvoUnity.Singletons.PersistentSingleton< T >.HasInstance |
|
staticget |
◆ Instance
| T IuvoUnity.Singletons.PersistentSingleton< T >.Instance |
|
staticget |
The documentation for this class was generated from the following file: