Init() private static method

private static Init ( ) : void
return void
コード例 #1
0
        public override void OnPreviewSettings()
        {
            WebCamTextureInspector.Init();
            GUI.enabled = !Application.isPlaying;
            WebCamTexture webCamTexture = base.target as WebCamTexture;
            bool          flag          = PreviewGUI.CycleButton((!webCamTexture.isPlaying) ? 0 : 1, WebCamTextureInspector.s_PlayIcons) != 0;

            if (flag != webCamTexture.isPlaying)
            {
                if (flag)
                {
                    webCamTexture.Stop();
                    webCamTexture.Play();
                }
                else
                {
                    webCamTexture.Pause();
                }
            }
            GUI.enabled = true;
        }
コード例 #2
0
        public override void OnPreviewSettings()
        {
            WebCamTextureInspector.Init();
            GUI.enabled = !Application.isPlaying;
            WebCamTexture target = this.target as WebCamTexture;
            bool          flag   = PreviewGUI.CycleButton(!target.isPlaying ? 0 : 1, WebCamTextureInspector.s_PlayIcons) != 0;

            if (flag != target.isPlaying)
            {
                if (flag)
                {
                    target.Stop();
                    target.Play();
                }
                else
                {
                    target.Pause();
                }
            }
            GUI.enabled = true;
        }