Grid snapping in unity editor

 There are virtual grid in the editor's Scene view that help you to align GameObjects snapping(moving) to the nearest grid

grids in unity editor

You can change this grid to any axis x,y,or z. 

Aligning (Moving) to the grid

GameObject can be move to the single axis or along all axis to the closest grid. To move a gameObject to closest grid open Grid and snap window by either method
  • From Main unity menu, Choose Edit>Grid and Snapping Setting
    opening Grid and snap setting from unit editor

  • From the grid visible in scene view menu open the overflow menu and choose Edit Grid and Snap Setting
and you can reset all grid settings by just clicking reset as shown in below image.

opening drid and snap setting from unity editor scene view

in grid and snap setting  you will find Align selection sector click on x, y, or z button or to all axis
grid and snap setting in unity editor
or you can did the same work by selecting the gameobject and pressing Ctrl + \ key together for windows and command+\ key for macOS.
You can use increment Snap Section to modify how much you want to move and along which axis.

Showing and Hiding Grid lines

By toggling the grid visibility button in scene view toolbar you can display or hide grid on any axis (x, y, z )
displaying and hiding grid in unity editor
You can also change grid to any axis x, y, z to show by clicking grid visibility drop down menu and can change axis.
In grid setting You will find Opacity and from here you can change opacity of grid.

Changing default color of grid

You can change color of grid in scene view by opening unity preferences setting by navigating Edit > preferences and then click on color.
changing color of grid in unity

after clocking colors you will find grid and now you can change color of grid.

adjusting the grid's location

Use Shift+[ keys to move grid backward.
Use Shift+] keys to move grid forward.


Popular posts from this blog

How to install unity editor

How to fix Android Gradle Build failed error in unity

Unity ads install error from package manager