예제 #1
0
        /// <summary>
        /// Forces component HideFlags to be hidden in inspector
        /// </summary>
        void HideVideoComponents()
        {
            if (lmvp != null)
            {
                lmvp.hideFlags = HideFlags.HideInInspector;
            }

            if (vp != null)
            {
                vp.hideFlags = HideFlags.HideInInspector;
                // address issue where video player was being hidden, but not detaching clip

                int old_id = (vp.clip == null ? 0 : vp.clip.GetInstanceID());
                int new_id = (leiaMediaVideoClip == null ? 0 : leiaMediaVideoClip.GetInstanceID());

                vp.clip = leiaMediaVideoClip;

                if (VideoChangedResponses != null && old_id != new_id)
                {
                    VideoChangedResponses();
                }
            }

            if (aud_source != null)
            {
                aud_source.hideFlags = HideFlags.HideInInspector;
            }
        }
예제 #2
0
    private void LoopReached(VideoPlayer player)
    {
        if (_videoPlayer.clip.GetInstanceID() == m_idleClip.GetInstanceID())
        {
            return;
        }

        if (_videoPlayer.isLooping)
        {
            _videoPlayer.clip = m_idleClip;
        }
        m_clipOverAction?.Invoke();
    }