protected void Awake() { monkeyTesterSettings = Resources.Load <MonkeyTesterSettings>(nameof(MonkeyTesterSettings)); Enabled = monkeyTesterSettings.StartOnStartup; DontDestroyOnLoad(this.gameObject); }
public static void Execute() { monkeyTesterSettings = Resources.Load <MonkeyTesterSettings>(nameof(MonkeyTesterSettings)); if (monkeyTesterSettings.SpawnOnStartup) { GameObject prefab = Resources.Load <GameObject>(MONKEY_TESTER_RESOURCE_PATH); if (prefab != null) { GameObject instance = Object.Instantiate(prefab, Vector3.zero, Quaternion.identity); } } }