Struct GridDiagnosticUnityVisitor
Streams diagnostic cells into Unity gizmos while exposing query counts.
public struct GridDiagnosticUnityVisitor : IGridDiagnosticCellVisitor
- Implements
- Inherited Members
Constructors
GridDiagnosticUnityVisitor(bool, Color, Color, Color, Color, Color, Color)
Creates a Unity diagnostic visitor.
public GridDiagnosticUnityVisitor(bool drawGizmos, Color emptyCellColor, Color occupiedCellColor, Color blockedCellColor, Color boundaryCellColor, Color partitionedCellColor, Color missingSparseAddressColor)
Parameters
drawGizmosboolWhether visited cells are drawn as gizmos.
emptyCellColorColorThe color for empty cells.
occupiedCellColorColorThe color for occupied cells.
blockedCellColorColorThe color for blocked cells.
boundaryCellColorColorThe color for boundary cells.
partitionedCellColorColorThe color for partitioned cells.
missingSparseAddressColorColorThe color for missing sparse addresses.
Properties
LastCell
Gets the last visited diagnostic cell.
public readonly GridDiagnosticCell LastCell { get; }
Property Value
LastEdgeCount
Gets the edge count of the last visited cell.
public readonly int LastEdgeCount { get; }
Property Value
LastVertexCount
Gets the vertex count of the last visited cell.
public readonly int LastVertexCount { get; }
Property Value
MissingSparseAddressCellCount
Gets the number of visited missing sparse addresses.
public readonly int MissingSparseAddressCellCount { get; }
Property Value
PhysicalCellCount
Gets the number of visited physical cells.
public readonly int PhysicalCellCount { get; }
Property Value
VisitedCellCount
Gets the total number of visited diagnostic cells.
public readonly int VisitedCellCount { get; }
Property Value
Methods
CreateCountingOnly()
Creates a visitor that counts cells without drawing gizmos.
public static GridDiagnosticUnityVisitor CreateCountingOnly()
Returns
- GridDiagnosticUnityVisitor
The counting-only visitor.
Visit(in GridDiagnosticCell)
Visits, counts, and optionally draws a diagnostic cell.
public bool Visit(in GridDiagnosticCell cell)
Parameters
cellGridDiagnosticCellThe diagnostic cell.