Snap to Grid Tool - A script for easy snapping of object positions and scales to a grid within Unity Editor.
The Snap to Grid Tool script provides a convenient way to snap the position and scale of objects within the Unity Editor to a grid. It offers flexibility with customizable snapping options along different axes and adjustable step sizes.
- Snap object position and scale to a grid.
- Customizable snapping options for X, Y, and Z axes.
- Adjustable positioning step and offset.
- Support for scaling step.
- Download the
UnityEditorSnapToGrid.cs
script. - Add the script to your Unity project's scripts folder.
- Attach the
UnityEditorSnapToGrid.cs
script to the GameObjects you want to snap to the grid. - Adjust the script's properties in the Inspector panel based on your requirements.
- During scene editing in the Unity Editor, the script will automatically snap the object's position and scale to the specified grid.
See the CubeExample.prefab
file for an example of how to use the Snap to Grid Tool script with a cube GameObject.
This program is Free Software: You can use, study share and improve it at your will. Specifically you can redistribute and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.