Documentation

Unity Engine


User Manual

Script Reference

Unity Engine


EditorSnapSettings

Control the behavior of handle snapping in the editor.
Read time 1 minuteLast updated 6 days ago

Definition

  • Type: Class
  • Namespace: UnityEditor
  • Assembly: UnityEditor.CoreModule
public static class EditorSnapSettings

Static Properties

Property

Description

angleSnapEnabledGets or sets the enabled or disabled status of incremental angle snapping.
gridPositionGets or sets the position of the grid.
gridRotationGets or sets the rotation of the grid.
gridSizeGets or sets the grid size used for snapping.
gridSnapActiveGets whether grid snapping is active.
gridSnapEnabledGets or sets whether grid snapping is enabled.
incrementalSnapActiveGets whether increment snapping is active.
moveGets or sets the increment that translation handles snap to.
rotateGets or sets the increment that rotation handles snap to.
scaleGets or sets the increment value that the scale handles snap to.
scaleSnapEnabledGets or sets the enabled or disabled status of incremental scale snapping.
snapEnabledGets or sets whether snapping is enabled.

Static Methods

Method

Description

ResetSnapSettingsResets EditorSnap settings to default values.

Static Events

Member

Description

angleSnapEnabledChangedA callback that is triggered when the
angleSnapEnabled
value changes.
gridSnapEnabledChangedCallback triggered when the grid snap enabled value changes.
scaleSnapEnabledChangedA callback that is triggered when the
scaleSnapEnabled
value changes.
snapEnabledChangedCalls the methods in its invocation list when the EditorSnapSettings.snapEnabled value changes .