Quick Start
beginner quick startTerrain Grid System 2 · Quick Start
Quick Start (5 minutes)
Prerequisites: Unity 2022.3+ with any render pipeline. Import Terrain Grid System 2 from the Asset Store.
Step 1 — Import and Run Demo Scenes
- Import the asset into your project (or create a fresh project).
- Open the Demo folder and run the included scenes to explore common use cases.
- Examine the script attached to the
DemoGameObject to understand how TGS properties and events work from code.
Tip: Demo scenes include a
TerrainGridSystem instance (the prefab) and a Demo GameObject with a script that demonstrates key API usage.
Step 2 — Add a Grid to Your Scene
There are three ways to add the grid in the Editor:
| Method | When to Use | Steps |
|---|---|---|
| Menu | 2D / non-terrain grids | Go to GameObject > 3D Object > Terrain Grid System |
| Add Component | Terrain or mesh-based terrain | Select your terrain GameObject, click Add Component, search for Terrain Grid System |
| Prefab | Manual setup | Drag the TerrainGridSystem prefab from Resources/Prefabs into your scene, then assign the terrain reference |
Step 3 — Add a Grid at Runtime
You can also instantiate the grid dynamically:
// Option A: Add component directly
TerrainGridSystem tgs = myTerrainGameObject.AddTerrainGridSystem();
// Option B: Instantiate the prefab and assign terrain
GameObject prefab = Resources.Load<GameObject>("Prefabs/TerrainGridSystem");
GameObject go = Instantiate(prefab);
go.GetComponent<TerrainGridSystem>().SetTerrain(myTerrainGameObject);
Step 4 — Basic Configuration
Once the grid is in the scene, configure these key properties in the Inspector:
- Topology — choose Hexagonal, Box, or Irregular
- Rows / Columns — set the grid dimensions
- Territories — optionally set the number of territories
- Highlight Mode — choose Cells or Territories for mouse interaction
URP Note: If the grid is not visible in URP, try disabling Depth Priming Mode in your Universal Renderer asset.
Next Steps
- Setup Guide — detailed positioning and terrain options
- Inspector Reference — every property explained
- Scripting Support — control the grid from C#
Was this page helpful?
Suggest an improvement
Help us improve this documentation page.