Skip to content

Commit 9dd6e33

Browse files
committed
Add an option to disable culling data gizmos
1 parent 8f6755c commit 9dd6e33

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

Assets/Code/Culling/CullingData.cs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,8 @@ public class CullingData : MonoBehaviour {
1919

2020
public int ChunkSize = 3;
2121

22+
public bool DrawGizmo = false;
23+
2224
public void Initialize() {
2325
this.MapBehaviour = this.GetComponent<MapBehaviour>();
2426
this.RoomsByPosition = new Dictionary<Vector3Int, Room>();
@@ -250,8 +252,8 @@ private Portal getPortal(Vector3Int position, int direction) {
250252

251253
#if UNITY_EDITOR
252254
[DrawGizmo(GizmoType.InSelectionHierarchy | GizmoType.NotInSelectionHierarchy)]
253-
static void DrawGizmo(CullingData cullingData, GizmoType gizmoType) {
254-
if (cullingData.ChunksInRange == null) {
255+
static void DrawGizmos(CullingData cullingData, GizmoType gizmoType) {
256+
if (!cullingData.DrawGizmo || cullingData.ChunksInRange == null) {
255257
return;
256258
}
257259
foreach (var chunk in cullingData.ChunksInRange) {

0 commit comments

Comments
 (0)