void OnDrawGizmos() { if (tree != null) { tree.DrawGizmoBoxes(); } }
void OnDrawGizmos() { if (roomNodeList != null) { foreach (RoomNode room in roomNodeList) { if (room.octTreeNode != null) { Gizmos.color = room.octTreeNode.gizmoColor; } if (!room.isCorridor) { Gizmos.DrawWireCube(room.roomBounds.center, room.roomBounds.size); } if (showRoomConnections) { foreach (RoomNode neighbor in room.neighbors) { Gizmos.color = Color.red; Gizmos.DrawLine(room.roomBounds.center, neighbor.roomBounds.center); Vector3 diff = (neighbor.roomBounds.center - room.roomBounds.center).normalized; Vector3 cam = UnityEditor.SceneView.currentDrawingSceneView.camera.transform.forward; Gizmos.DrawLine(room.roomBounds.center + Vector3.Cross(diff, cam), neighbor.roomBounds.center); } } } if (showOctTree) { root.DrawGizmoBoxes(); } } else { Gizmos.color = Color.white; Gizmos.DrawWireCube(totalBounds.center + transform.position, Vector3.Scale(totalBounds.size, transform.localScale)); } }