private void OnDrawGizmos() { Vector3 _POS = transform.position; if (Factory.INSTANCE == null) { Factory.INSTANCE = FindObjectOfType <Factory>(); } float cellSize = Factory.INSTANCE.storageCellSize; Gizmos.color = colour; width = ((linesX * lineLength) + ((linesX - 1) * gutterX)) * cellSize; depth = ((linesZ * lines_groupBy_Z) + ((linesZ - 1) * gutterZ)) * cellSize; GizmoHelpers.DrawRect(colour, _POS, width, depth, Log()); Vector3 _START = _POS + new Vector3(0f, 0f, (depth) * factor); GizmoHelpers.DrawLine(Color.white, _START, _START + new Vector3(width, 0f, 0f)); // flash on action? if (taskStep == 0) { } if (GIZMOS_DRAW_CELLS) { clusterCapacity = lineLength * lines_groupBy_Y * lines_groupBy_Z; capacity = clusterCapacity * (linesX * linesY * linesZ); } }
private void OnDrawGizmos() { Gizmos.color = this.color; Vector3 v = this.getPos(); switch (this.areaShape) { case EnumRegionShape.POINT: Gizmos.DrawWireSphere(v, 0.1f); break; case EnumRegionShape.SQUARE: Gizmos.DrawWireCube(v, new Vector3(this.xSize, 0, this.zSize)); break; case EnumRegionShape.CIRCLE: GizmoHelpers.drawCircle(v, this.radius, 16); break; case EnumRegionShape.LINE: float half = this.length / 2; Gizmos.DrawLine(v + this.transform.forward * half, v - this.transform.forward * half); break; case EnumRegionShape.SPHERE: Gizmos.DrawWireSphere(v, this.radius); break; case EnumRegionShape.CUBE: Gizmos.DrawWireCube(v, new Vector3(this.xSize, this.ySize, this.zSize)); break; } }
protected override void OnDrawGizmos() { if (rig != null) { // Draw XR Rig box Gizmos.color = Color.green; GizmoHelpers.DrawWireCubeOriented(rig.transform.position, rig.transform.rotation, 3f); GizmoHelpers.DrawAxisArrows(rig.transform, 0.5f); } if (cameraFloorOffsetObject != null) { GizmoHelpers.DrawAxisArrows(cameraFloorOffsetObject.transform, 0.5f); } if (rig != null) { var cameraPosition = rig.transform.position; Gizmos.color = Color.red; GizmoHelpers.DrawWireCubeOriented(cameraPosition, rig.transform.rotation, 0.1f); GizmoHelpers.DrawAxisArrows(rig.transform, 0.5f); if (rig != null) { var floorPos = cameraPosition; floorPos.y = rig.transform.position.y; Gizmos.DrawLine(floorPos, cameraPosition); } } }
private void OnDrawGizmos() { if (origin != null) { Gizmos.color = Color.green; GizmoHelpers.DrawWireCubeOriented(origin.transform.position, origin.transform.rotation, 3.0f * origin.transform.localScale.x); } }
void Gizmos_DrawCell(Vector3 _cell_POS, Vector3 _cell_SIZE) { Gizmos.DrawCube(_cell_POS + _cell_SIZE * 0.5f, _cell_SIZE); Gizmos.DrawWireCube(_cell_POS, _cell_SIZE); GizmoHelpers.DrawRect(colour, _cell_POS, _cell_SIZE.x, _cell_SIZE.y); }