mirror of
https://github.com/MirrorNetworking/Mirror.git
synced 2024-11-18 11:00:32 +00:00
fix(NetworkTransformBase) Debug Options Dropdown
This commit is contained in:
parent
5882674b8f
commit
5f0c2467fb
@ -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 //////////////////////////////////////////////////////
|
||||
|
Loading…
Reference in New Issue
Block a user