mirror of
https://github.com/MirrorNetworking/Mirror.git
synced 2024-11-18 19:10: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
|
Default = OnlySyncOnChange | CompressRotation
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[Flags]
|
||||||
|
public enum DebugOptions
|
||||||
|
{
|
||||||
|
Nothing,
|
||||||
|
ShowGizmos = 1 << 0,
|
||||||
|
ShowOverlay = 1 << 1
|
||||||
|
}
|
||||||
|
|
||||||
public abstract class NetworkTransformBase : NetworkBehaviour
|
public abstract class NetworkTransformBase : NetworkBehaviour
|
||||||
{
|
{
|
||||||
// target transform to sync. can be on a child.
|
// 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;
|
protected double offset => timelineOffset ? NetworkServer.sendInterval * sendIntervalMultiplier : 0;
|
||||||
|
|
||||||
// debugging ///////////////////////////////////////////////////////////
|
// debugging ///////////////////////////////////////////////////////////
|
||||||
[Header("Debug")]
|
[Header("Debug Settings")]
|
||||||
public bool showGizmos;
|
[SerializeField, Tooltip("Debug Options")]
|
||||||
public bool showOverlay;
|
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);
|
public Color overlayColor = new Color(0, 0, 0, 0.5f);
|
||||||
|
|
||||||
// initialization //////////////////////////////////////////////////////
|
// initialization //////////////////////////////////////////////////////
|
||||||
|
Loading…
Reference in New Issue
Block a user