void MakeSingleton() { if (instance != null) { Destroy(gameObject); } else { instance = this; DontDestroyOnLoad(gameObject); } }
void Start() { Instance = this; ObjectManager = gameObject.AddComponent <ObjectManager>(); FlashLightController = gameObject.AddComponent <FlashLightController>(); InputController = gameObject.AddComponent <InputController>(); SelectionController = gameObject.AddComponent <SelectionController>(); WeaponController = gameObject.AddComponent <WeaponController>(); InteractionController = gameObject.AddComponent <InteractionController>(); MasterSoundController = gameObject.AddComponent <MasterSoundController>(); EnableDefaults(); }