Example #1
0
 private void OnGUI()
 {
     if (!m_ShowDebugText)
     {
         CinemachineGameWindowDebug.ReleaseScreenPos(this);
     }
     else
     {
         // Show the active camera and blend
         Color color             = GUI.color;
         ICinemachineCamera vcam = ActiveVirtualCamera;
         string             text = "CM " + gameObject.name + ": ";
         if (SoloCamera != null)
         {
             text     += "SOLO ";
             GUI.color = GetSoloGUIColor();
         }
         if (ActiveBlend == null)
         {
             text += (vcam != null ? "[" + vcam.Name + "]" : "(none)");
         }
         else
         {
             text += ActiveBlend.Description;
         }
         Rect r = CinemachineGameWindowDebug.GetScreenPos(this, text, GUI.skin.box);
         GUI.Label(r, text, GUI.skin.box);
         GUI.color = color;
     }
 }
 /// <summary>Displays the current active camera on the game screen, if requested</summary>
 protected override void OnGUI()
 {
     base.OnGUI();
     if (!m_ShowDebugText)
     {
         CinemachineGameWindowDebug.ReleaseScreenPos(this);
     }
     else
     {
         string text = Name + ": " + Description;
         Rect   r    = CinemachineGameWindowDebug.GetScreenPos(this, text, GUI.skin.box);
         GUI.Label(r, text, GUI.skin.box);
     }
 }
Example #3
0
 /// <summary>Displays the current active camera on the game screen, if requested</summary>
 protected override void OnGUI()
 {
     base.OnGUI();
     if (!m_ShowDebugText)
     {
         CinemachineGameWindowDebug.ReleaseScreenPos(this);
     }
     else
     {
         // Show the active camera and blend
         ICinemachineCamera vcam = LiveChild;
         string             text = "CM " + gameObject.name + ": ";
         if (mActiveBlend != null)
         {
             text += mActiveBlend.Description;
         }
         else
         {
             text += (vcam == null) ? "(none)" : vcam.Name;
         }
         Rect r = CinemachineGameWindowDebug.GetScreenPos(this, text, GUI.skin.box);
         GUI.Label(r, text, GUI.skin.box);
     }
 }