Beispiel #1
0
        protected virtual void OnEnable()
        {
            controller           = (VideoClipEventController)target;
            controller.hideFlags = HideFlags.HideInInspector;
#if UNITY_EDITOR
            controller.Init();
#endif
        }
Beispiel #2
0
        private static void ForceVideoPlayerCheck()
        {
            VideoPlayer [] players = Object.FindObjectsOfType <VideoPlayer>();
            foreach (VideoPlayer player in players)
            {
                VideoClipEventController controller = player.gameObject.AddSingleComponent <VideoClipEventController>();
#if UNITY_EDITOR
                controller.IsDirty = true;
#endif
                EditorUtility.SetDirty(controller);
            }
        }