diff --git a/Assets/Scripts/ExternalAssets/Runtime Transform Gizmos/RTGApp.cs b/Assets/Scripts/ExternalAssets/Runtime Transform Gizmos/RTGApp.cs index f07b3883..a42fa0a7 100644 --- a/Assets/Scripts/ExternalAssets/Runtime Transform Gizmos/RTGApp.cs +++ b/Assets/Scripts/ExternalAssets/Runtime Transform Gizmos/RTGApp.cs @@ -14,6 +14,7 @@ namespace RTG public event RTGAppInitializedHandler Initialized; private Camera _renderCamera; private RenderPipelineId _renderPipelineId; + private bool isPaused; public RenderPipelineId RenderPipelineId { get { return _renderPipelineId; } } public Camera RenderCamera { get { return _renderCamera; } } @@ -103,6 +104,9 @@ namespace RTG private void Update() { + if (isPaused) + return; + // Note: Don't change the order :) RTInputDevice.Get.Update_SystemCall(); RTFocusCamera.Get.Update_SystemCall(); @@ -207,6 +211,9 @@ namespace RTG typeof(RTInputDevice), typeof(RTUndoRedo), typeof(RTGizmosEngine), }; } - + private void OnApplicationFocus(bool focus) + { + isPaused = !focus; + } } }