void Awake() { if (instance != null) { GameObject.DestroyImmediate(instance); Debug.LogError("duplicate instance of singleton found. deleting the old one."); } instance = this; // this gets initialized by the GameManager now // Initialize(); }