temporary files rename
This commit is contained in:
parent
8e077e523c
commit
a87f0ed109
823 changed files with 20 additions and 5 deletions
|
@ -0,0 +1,18 @@
|
|||
using UnityEngine;
|
||||
|
||||
public class MonoBehaviourSingletonPersistent<T> : MonoBehaviour
|
||||
where T : Component
|
||||
{
|
||||
public static T Instance { get; private set; }
|
||||
|
||||
public virtual void Awake ()
|
||||
{
|
||||
if (Instance == null) {
|
||||
Instance = this as T;
|
||||
Instance.name = typeof(T).Name;
|
||||
DontDestroyOnLoad (gameObject);
|
||||
} else {
|
||||
Destroy (gameObject);
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue