Class GridTraceVisualizer
Unity Scene View visualizer for topology-aware GridForge trace coverage.
[ExecuteAlways]
[AddComponentMenu("GridForge/Debugging/Grid Trace Visualizer")]
public class GridTraceVisualizer : MonoBehaviour
- Inheritance
-
ObjectComponentBehaviourMonoBehaviourGridTraceVisualizer
- Inherited Members
-
MonoBehaviour.IsInvoking()MonoBehaviour.CancelInvoke()MonoBehaviour.StopCoroutine(Coroutine)MonoBehaviour.StopAllCoroutines()MonoBehaviour.destroyCancellationTokenMonoBehaviour.useGUILayoutMonoBehaviour.didStartMonoBehaviour.didAwakeMonoBehaviour.runInEditModeBehaviour.enabledBehaviour.isActiveAndEnabledComponent.GetComponent<T>()Component.TryGetComponent<T>(out T)Component.GetComponentInChildren<T>()Component.GetComponentsInChildren<T>()Component.GetComponentInParent<T>()Component.GetComponentsInParent<T>()Component.GetComponents<T>()Component.GetComponentIndex()Component.CompareTag(TagHandle)Component.transformComponent.transformHandleComponent.gameObjectComponent.tagObject.GetEntityId()Object.MemberwiseClone()Object.GetInstanceID()Object.GetHashCode()Object.InstantiateAsync<T>(T)Object.InstantiateAsync<T>(T, Transform)Object.InstantiateAsync<T>(T, Vector3, Quaternion)Object.InstantiateAsync<T>(T, Transform, Vector3, Quaternion)Object.Instantiate(Object, Vector3, Quaternion)Object.Instantiate(Object, Vector3, Quaternion, Transform)Object.Instantiate(Object)Object.Instantiate(Object, Scene)Object.Instantiate<T>(T, InstantiateParameters)Object.Instantiate<T>(T, Vector3, Quaternion, InstantiateParameters)Object.Instantiate(Object, Transform)Object.Instantiate<T>(T)Object.Instantiate<T>(T, Vector3, Quaternion)Object.Instantiate<T>(T, Vector3, Quaternion, Transform)Object.Instantiate<T>(T, Transform)Object.Destroy(Object)Object.DestroyImmediate(Object)Object.DontDestroyOnLoad(Object)Object.DestroyObject(Object)Object.FindObjectsOfType<T>()Object.FindObjectsByType<T>(FindObjectsSortMode)Object.FindObjectsByType<T>(FindObjectsInactive, FindObjectsSortMode)Object.FindObjectOfType<T>()Object.FindFirstObjectByType<T>()Object.FindAnyObjectByType<T>()Object.FindFirstObjectByType<T>(FindObjectsInactive)Object.FindAnyObjectByType<T>(FindObjectsInactive)Object.FindObjectsByType<T>()Object.FindObjectsByType<T>(FindObjectsInactive)Object.ToString()Object.nameObject.hideFlags
Properties
EndTransform
Gets or sets the trace end transform.
public Transform EndTransform { get; set; }
Property Value
- Transform
LastTracedGridCount
Gets the grid count from the most recent gizmo trace.
public int LastTracedGridCount { get; }
Property Value
LastTracedVoxelCount
Gets the voxel count from the most recent gizmo trace.
public int LastTracedVoxelCount { get; }
Property Value
LayerY
Gets the Y layer used for XZ tracing.
public Fixed64 LayerY { get; }
Property Value
StartTransform
Gets or sets the trace start transform.
public Transform StartTransform { get; set; }
Property Value
- Transform
TraceMode
Gets the active trace projection mode.
public GridTraceMode TraceMode { get; }
Property Value
Methods
ConfigureTraceMode(GridTraceMode, Fixed64)
Configures the trace projection and optional XZ layer.
public void ConfigureTraceMode(GridTraceMode mode, Fixed64 layerY = default)
Parameters
modeGridTraceModeThe trace projection mode.
layerYFixed64The Y layer used by XZ tracing.
GetTraceVoxelsInto(GridWorld, Vector3d, Vector3d, SwiftList<Voxel>)
Collects the voxels covered by a trace into an existing list.
public int GetTraceVoxelsInto(GridWorld world, Vector3d start, Vector3d end, SwiftList<Voxel> results)
Parameters
worldGridWorldThe active world to trace.
startVector3dThe trace start position.
endVector3dThe trace end position.
resultsSwiftList<Voxel>The destination list, which is cleared before use.
Returns
- int
The number of collected voxels.
TryGetFirstTraceDiagnosticCell(GridWorld, Vector3d, Vector3d, out GridDiagnosticCell)
Tries to create a diagnostic descriptor for the first traced voxel.
public bool TryGetFirstTraceDiagnosticCell(GridWorld world, Vector3d start, Vector3d end, out GridDiagnosticCell cell)
Parameters
worldGridWorldThe active world to trace.
startVector3dThe trace start position.
endVector3dThe trace end position.
cellGridDiagnosticCellReceives the first diagnostic cell.