コード例 #1
0
        private void _Update()
        {
                        #if UNITY_EDITOR
            _frameCounter++;
            _frameCounter %= _editorUpdateFrameInterval;
            if (_frameCounter == 0)
            {
                UnityEditor.SceneView.RepaintAll();
                gameview.Repaint();
            }
                        #endif

            if (isReceiving)
            {
                //Debug.Log("checkReceivers");
                checkReceivers();
            }

            lock (this){
                foreach (TextureInfo s in newSenders)
                {
                    //Debug.Log("texSharedDelegate");
                    activeSenders.Add(s);
                    if (texSharedDelegate != null)
                    {
                        texSharedDelegate(s);
                    }
                }

                newSenders.Clear();

                foreach (TextureInfo s in stoppedSenders)
                {
                    foreach (TextureInfo t in activeSenders)
                    {
                        if (s.name == t.name)
                        {
                            activeSenders.Remove(t);
                            break;
                        }
                    }

                    //Debug.Log ("Stopped sender from Spout :"+s.name);
                    if (senderStoppedDelegate != null)
                    {
                        senderStoppedDelegate(s);
                    }
                }

                stoppedSenders.Clear();
            }            //lock
        }
コード例 #2
0
        private void repaintGameView()
        {
                        #if UNITY_EDITOR
            if (getMainGameViewMethod == null)
            {
                initGameViewMethod();
            }

            UnityEditor.EditorWindow gameviewWindow = (UnityEditor.EditorWindow)getMainGameViewMethod.Invoke(null, null);
            if (gameviewWindow != null)
            {
                gameviewWindow.Repaint();
            }
                        #endif
        }
コード例 #3
0
 public void GUIUpdate(UnityEditor.EditorWindow window)
 {
     _zoom = Mathf.Lerp(previousZoom, targetZoom, (Time.realtimeSinceStartup - timeZoomRequested) / zoomEffectDuration);
     if (Event.current.type == EventType.Repaint)
     {
         if (_zoom == targetZoom)
         {
             IsZooming = false;
         }
         else
         {
             window.Repaint();
         }
     }
 }