diff --git a/Assets/Scripts/Units/Unit.cs b/Assets/Scripts/Units/Unit.cs index 471cf72..c035afb 100644 --- a/Assets/Scripts/Units/Unit.cs +++ b/Assets/Scripts/Units/Unit.cs @@ -102,13 +102,18 @@ namespace Reset.Units{ private void DrawStateGizmo(){ // Get state from FSM - if (UnitIsLocal()) { + + string stateString = ""; + if (UnitIsNetworked() && UnitIsLocal()) { graphStateAsString.Value = FSM.currentRootStateName; + stateString = graphStateAsString.Value.ToString(); + } else { + stateString = FSM.currentRootStateName; } // Draw state gizmo, regardless of if local or not try { - Draw.ingame.Label2D(transform.position + Vector3.up * 2.7f, graphStateAsString.Value.ToString(), + Draw.ingame.Label2D(transform.position + Vector3.up * 2.7f, stateString, Color.red); } catch (Exception e) { Debug.LogError(e.Message);