void Awake() { _gallery = gameObject.GetComponent <RealmGallery> (); Debug.Assert(_gallery != null, "Gallery is missing"); _autoplay = gameObject.GetComponent <RealmAutoplayController> (); if (_autoplay == null) { _autoplay = gameObject.AddComponent <RealmAutoplayController> (); _autoplay.delay = DEFAULT_AUTOPLAY_DELAY; } }
protected override void Init() { base.Init(); if (_gallery != null) { _gallery = gameObject.GetComponentInParent <RealmGallery> (); } Debug.Assert(_gallery != null, "Gallery is missing"); _ui = gameObject.GetComponent <RealmPrevNextButtonUI> (); _ui.UpdateView(_type); gameObject.GetComponent <GazeClickMeter> ().autoReset = true; }