void Awake() { GamingEnvironment environment = FindObjectOfType <GamingEnvironment>(); if (environment && environment != this) { Debug.Log("Duplicate Gaming Environment Detected, destroying" + gameObject.name); Destroy(this); return; } DontDestroyOnLoad(this); for (int i = 0; i < _environmentObjects.Count; ++i) { Instantiate(_environmentObjects[i], transform); } }
void Awake() { GamingEnvironment environment = FindObjectOfType <GamingEnvironment>(); if (environment && environment != this) { Debug.Log("Duplicate Gaming Environment Detected, destroying" + gameObject.name); Destroy(this); return; } for (int i = 0; i < _environmentObjects.Count; ++i) { Instantiate(_environmentObjects[i], transform); } if (InputManager.Instance) { InputManager.Instance.SetDebugMode(_debugMode); } }
public static void Start(GamingEnvironment a_environment, GameSceneLookup a_lookup, GameSceneEnum a_startScene) { enviroment = a_environment; currentScene = a_startScene; lookup = a_lookup; }