diff --git a/Assets/Mirror/Components/NetworkTransform/NetworkTransformBase.cs b/Assets/Mirror/Components/NetworkTransform/NetworkTransformBase.cs index b8743942a..78f3d9811 100644 --- a/Assets/Mirror/Components/NetworkTransform/NetworkTransformBase.cs +++ b/Assets/Mirror/Components/NetworkTransform/NetworkTransformBase.cs @@ -43,6 +43,14 @@ public enum BandwidthSavingsOptions Default = OnlySyncOnChange | CompressRotation } + [Flags] + public enum DebugOptions + { + Nothing, + ShowGizmos = 1 << 0, + ShowOverlay = 1 << 1 + } + public abstract class NetworkTransformBase : NetworkBehaviour { // target transform to sync. can be on a child. @@ -113,9 +121,13 @@ public abstract class NetworkTransformBase : NetworkBehaviour protected double offset => timelineOffset ? NetworkServer.sendInterval * sendIntervalMultiplier : 0; // debugging /////////////////////////////////////////////////////////// - [Header("Debug")] - public bool showGizmos; - public bool showOverlay; + [Header("Debug Settings")] + [SerializeField, Tooltip("Debug Options")] + internal DebugOptions debugOptions = DebugOptions.Nothing; + + public bool showGizmos => (debugOptions & DebugOptions.ShowGizmos) == DebugOptions.ShowGizmos; + public bool showOverlay => (debugOptions & DebugOptions.ShowOverlay) == DebugOptions.ShowOverlay; + public Color overlayColor = new Color(0, 0, 0, 0.5f); // initialization //////////////////////////////////////////////////////