public override void Draw() { base.Draw(); Gizmos.color = Color.green; Size = Size == Vector3.zero ? IsoTransform.Size : Size; if (IsoTransform != null) { GizmosExtension.DrawIsoWireCube(IsoTransform.Position + Center, Size); } }
public void Draw() { var isoCollider = GetComponent<IsoCollider>(); if (isoCollider != null && isoCollider.isActiveAndEnabled) isoCollider.Draw(); else { Gizmos.color = Color.white; GizmosExtension.DrawIsoWireCube(Position, Size); } }
// Used via button and editor to see current gridgraph set up void OnDrawGizmos() { if (!ShowGraph) { return; } Gizmos.color = Color.red; foreach (var gridPos in _gridGraph.Keys) { var node = _gridGraph[gridPos]; Gizmos.color = node.Passable ? Color.red : Color.black; var center = new Vector3(node.Position.x, node.Position.y, node.Position.z); var size = new Vector3(1, node.Height, 1); GizmosExtension.DrawIsoWireCube(center, size); foreach (var nextNode in node.NextNodes) { GizmosExtension.DrawIsoArrow(node.Position, nextNode.Position); } } }
void OnDrawGizmos() { if (!ShowGraph) { return; } Gizmos.color = Color.red; foreach (var gridPos in _gridGraph.Keys) { foreach (var gap in _gridGraph[gridPos]) { Gizmos.color = gap.Passable ? Color.red : Color.black; var center = new Vector3(gridPos.x, (gap.MaxY + gap.MinY) / 2, gridPos.y); var size = new Vector3(1, gap.MaxY - gap.MinY, 1); GizmosExtension.DrawIsoWireCube(center, size); foreach (var nextNode in gap.NextNodes) { GizmosExtension.DrawIsoArrow(gap.Position, nextNode.Position); } } } }
public void Draw() { Gizmos.color = Color.white; GizmosExtension.DrawIsoWireCube(Position, Size); }