To create a Gizmo to show the selected object in the Scene panel, follow these steps:
- Create a new 3D project.
- For the Scene panel, turn off the Skybox view (or simply toggle off all the visual settings) so that you have a plain background for your grid work:
- The display, and updating the child objects, will be performed by a script class called GridGizmo. Create a new C# script class called GridGizmo which contains the following:
using System.Collections; using System.Collections.Generic; using UnityEngine; public class GridGizmo : MonoBehaviour { [SerializeField] public int grid = 2; public void SetGrid(int grid) { ...