private static void Initialise(VitaSaveManager instance) { if (_instance == null) { _instance = instance; instance.OnInitialize(); UnityEngine.Object.DontDestroyOnLoad(_instance.gameObject); } else if (_instance != instance) { UnityEngine.Object.DestroyImmediate(instance); } }
private static void Initialise(VitaSaveManager instance) { if (VitaSaveManager._instance == null) { VitaSaveManager._instance = instance; instance.OnInitialize(); Object.DontDestroyOnLoad(VitaSaveManager._instance.get_gameObject()); } else if (VitaSaveManager._instance != instance) { Object.DestroyImmediate(instance); } }
private void Awake() { VitaSaveManager.Initialise(this); }