// Sets up singleton instance. Will remain if one does not already exist in scene void Awake() { if (instance == null) { DontDestroyOnLoad(gameObject); instance = this; } else if (instance != this) { Destroy(gameObject); } if(effectPrefabs == null) effectPrefabs = new List<GameObject>(); }
// Sets up singleton instance. Will remain if one does not already exist in scene void Awake() { if (instance == null) { DontDestroyOnLoad(gameObject); instance = this; } else if (instance != this) { Destroy(gameObject); } if (effectPrefabs == null) { effectPrefabs = new List <GameObject>(); } }