//singleton implemenation void Awake() { if (!GlobalVars.MEDICAL_USE) { // destroys the gameobject if medical use is not turned on Destroy(gameObject); } else if (instance == null) { instance = this; DontDestroyOnLoad (gameObject); } else { suppressOnLoadCall = true; Destroy(gameObject); } }
//singleton implemenation void Awake() { if (!GlobalVars.MEDICAL_USE) // destroys the gameobject if medical use is not turned on { Destroy(gameObject); } else if (instance == null) { instance = this; DontDestroyOnLoad(gameObject); } else { suppressOnLoadCall = true; Destroy(gameObject); } }