From 38440aa0dbe7e553d3c54df53bbf8384a3ac71e9 Mon Sep 17 00:00:00 2001
From: miepzerino <o.skotnik@gmail.com>
Date: Thu, 03 Apr 2025 20:27:42 +0000
Subject: [PATCH] show chunk position in gizmo
---
Assets/Scripts/GenerateTileMap.cs | 7 +++++++
1 files changed, 7 insertions(+), 0 deletions(-)
diff --git a/Assets/Scripts/GenerateTileMap.cs b/Assets/Scripts/GenerateTileMap.cs
index 28d1cc4..f17a0aa 100644
--- a/Assets/Scripts/GenerateTileMap.cs
+++ b/Assets/Scripts/GenerateTileMap.cs
@@ -595,10 +595,17 @@
0
);
+ // Draw chunk boundary
Gizmos.DrawWireCube(
worldPos + new Vector3(CHUNK_SIZE / 2f, -CHUNK_SIZE / 2f, 0),
new Vector3(CHUNK_SIZE, CHUNK_SIZE, 0)
);
+
+ // Draw chunk coordinates
+ UnityEditor.Handles.Label(
+ worldPos + new Vector3(CHUNK_SIZE / 2f, -CHUNK_SIZE / 2f, 0),
+ $"({chunk.x}, {chunk.y})"
+ );
}
}
}
--
Gitblit v1.10.0