void Awake() { persistentobj = GameObject.Find("PersistThroughScenes"); if (persistentobj != null) { persistScript = persistentobj.GetComponent <PersistThroughScenes> (); } }
void Awake() { causeDD = GetComponent <CauseDamageDestroy> (); persistentobj = GameObject.Find("PersistThroughScenes"); if (persistentobj != null) { persistScript = persistentobj.GetComponent <PersistThroughScenes> (); } }
void Awake() { thisToggle = GetComponent <Toggle> (); persistentobj = GameObject.Find("PersistThroughScenes"); if (persistentobj != null) { persistScript = persistentobj.GetComponent <PersistThroughScenes> (); persistScript.isJoyorKeyToggle = this.gameObject.GetComponent <Toggle> (); } }
void Awake() { thisSlider = GetComponent <Slider> (); persistobj = GameObject.Find("PersistThroughScenes"); if (persistobj != null) { persistScript = persistobj.GetComponent <PersistThroughScenes> (); persistScript.sensitivitySlider = this.gameObject.GetComponent <Slider> (); } }
void Awake() { //Debug.Log ("replay"); if (instance == null) { instance = this; } else if (instance != null) { // Debug.Log ("had to be done bro"); Destroy(gameObject); } DontDestroyOnLoad(this.gameObject); }