public void OnEnable()
        {
            ytdlVideoPlayer = (YTDLVideoPlayer)target;

            videoRenderer = serializedObject.FindProperty("videoRenderer");
            targetCamera  = serializedObject.FindProperty("targetCamera");
        }
        private void Awake()
        {
            ytdlVideoPlayer = GetComponent <YTDLVideoPlayer>();

            if (videoTitle == null)
            {
                Debug.LogErrorFormat(LOG_FORMAT, "VideoTitle not attached!");
            }
            if (videoTime == null)
            {
                Debug.LogErrorFormat(LOG_FORMAT, "VideoTime not attached!");
            }
            if (playButton == null)
            {
                Debug.LogErrorFormat(LOG_FORMAT, "PlayButton not attached!");
            }
            if (loadingCircle == null)
            {
                Debug.LogErrorFormat(LOG_FORMAT, "LoadingCircle not attached!");
            }
            if (progressCircle == null)
            {
                Debug.LogErrorFormat(LOG_FORMAT, "ProgressCircle not attached!");
            }
            if (progressBar == null)
            {
                Debug.LogErrorFormat(LOG_FORMAT, "ProgressBar not attached!");
            }
            if (progressBarBG == null)
            {
                Debug.LogErrorFormat(LOG_FORMAT, "ProgressBarBG not attached!");
            }
            if (volumeCircle == null)
            {
                Debug.LogErrorFormat(LOG_FORMAT, "VolumeCircle not attached!");
            }
            if (volumeBar == null)
            {
                Debug.LogErrorFormat(LOG_FORMAT, "VolumeBar not attached!");
            }
            if (volumeBarBG == null)
            {
                Debug.LogErrorFormat(LOG_FORMAT, "VolumeBarBG not attached!");
            }
            if (qualityButton == null)
            {
                Debug.LogErrorFormat(LOG_FORMAT, "QualityButton not attached!");
            }

            // cache main camera
            mainCamera = Camera.main;

            progressPosY     = progressCircle.transform.localPosition.y;
            progressBarWidth = progressBarBG.GetComponent <SpriteRenderer>().bounds.size.x;

            volumePosY     = volumeCircle.transform.localPosition.y;
            volumeBarWidth = volumeBarBG.GetComponent <SpriteRenderer>().bounds.size.x;

            minProgressX = progressBar.transform.localPosition.x;
            maxProgressX = minProgressX + progressBarWidth;
        }