public GraphGizmoHelper GetGizmoHelper(NavSystem active, Hasher hasher) { var helper = Pool <GraphGizmoHelper> .Allocate(); helper.Init(active, hasher, this); return(helper); }
public GraphGizmoHelper GetSingleFrameGizmoHelper(NavSystem active) { var uniqHash = new RetainedGizmos.Hasher(); uniqHash.AddHash(Time.realtimeSinceStartup.GetHashCode()); Draw(uniqHash); return(GetGizmoHelper(active, uniqHash)); }
public void PushToStatic(NavSystem active) { _AreaColors = _AreaColors ?? new Color[1]; SolidColor = _SolidColor; UnwalkableNode = _UnwalkableNode; BoundsHandles = _BoundsHandles; ConnectionLowLerp = _ConnectionLowLerp; ConnectionHighLerp = _ConnectionHighLerp; MeshEdgeColor = _MeshEdgeColor; AreaColors = _AreaColors; }
public Hasher(NavSystem active) { hash = 0; debugHandler = active.debugHandler; //Todo: Debug Mode includePathSearchInfo = debugHandler != null; includeAreaInfo = false; //AddHash((int)active.debugMode); //AddHash(active.debugFloor.GetHashCode()); //AddHash(active.debugRoof.GetHashCode()); AddHash(AStarColor.ColorHash()); }
public void Init(NavSystem active, RetainedGizmos.Hasher hasher, RetainedGizmos gizmos) { if (active != null) { debugData = active.debugHandler; debugPathID = active.debugPathID; debugFloor = active.debugFloor; debugRoof = active.debugRoof; showSearchTree = active.showSearchTree && debugData != null; } this.gizmos = gizmos; this.hasher = hasher; builder = Pool <RetainedGizmos.Builder> .Allocate(); }