//------------------------------------------------------------------- void Start() { tinker = GameObject.Find("tinker").GetComponent<tinker>(); gravityBeam = GameObject.Find("gravityBeam").GetComponent<gravityBeam>(); phoneAppAnim = GameObject.Find("phone_app").GetComponent<Animator>(); snapshotAudio = GameObject.Find("camera_sound").GetComponent<snapshotSound>(); // make button invisible (gravity beam will make it visible) GetComponent<Renderer>().enabled = false; }
private void Awake() { if (instance != null && instance != this) { Destroy(this.gameObject); return; } else { instance = this; } DontDestroyOnLoad(this.gameObject); }