public override void Populate() { EnabledPanels = new Dictionary <Type, bool>(); var audioSub = GetComponentInParent <AudioSubpanel>(); var videoSub = GetComponentInParent <VideoSubpanel>(); if (audioSub) { AudioSubPanel = audioSub; AudioSubPanel.Slider = Slider; if (Time != null) { AudioSubPanel.Time = Time; } // TODO:: Make this happen dynamically by checking property of parent. EnabledPanels.Add(typeof(AudioSubpanel), true); } if (videoSub) { VideoSubPanel = videoSub; if (Time != null) { // Time? } if (FullScreenVideoToggle != null) { // The controls are on a video, set them active. if (VideoSubPanel.FullScreen != null) { VideoSubPanel.FullScreen.GetComponentInChildren <VideoControls>().VideoSubpanel = VideoSubPanel; FullScreenVideoToggle.SetActive(true); } } VideoSubPanel.time = Time; //TODO:: Make this happen dynamically by checking property of parent. EnabledPanels.Add(typeof(VideoSubpanel), true); } // Open Hook. if (OnOpen != null) { OnOpen(); } base.Populate(); }
// bool m_didShowInfo; //Logger m_logger; protected override void Awake() { base.Awake(); VideoSubpanel = GetComponentInChildren <VideoSubpanel>(); VideoSubpanel.PlaybackCompleted.AddListener(m_videoSubpanel_PlaybackCompleted); if (PlaybackCompleted == null) { PlaybackCompleted = new UnityEvent(); } //m_logger = new Logger(this); }
// bool m_didShowInfo; //Logger m_logger; protected override void Awake() { base.Awake(); if (!VideoSubpanel) { VideoSubpanel = GetComponentInChildren <VideoSubpanel>(); } VideoSubpanel.PlaybackCompleted.AddListener(m_videoSubpanel_PlaybackCompleted); if (!VideoControls) { VideoControls = GetComponentInChildren <VideoControls>(); } }