From 9ca4a339698dba58baf82ff8daaf9d8de5026676 Mon Sep 17 00:00:00 2001 From: miepzerino <o.skotnik@gmail.com> Date: Thu, 03 Apr 2025 21:02:34 +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 168a4eb..c102143 100644 --- a/Assets/Scripts/GenerateTileMap.cs +++ b/Assets/Scripts/GenerateTileMap.cs @@ -473,10 +473,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.9.3