Version: 2023.2

EditorSnapSettings

class in UnityEditor

切换到手册

描述

在编辑器中控制对齐处理行为。

静态变量

gridSizeGets or sets the grid size used for snapping.
gridSnapActiveGets whether grid snapping is active.
gridSnapEnabled获取或设置是否启用网格对齐。
incrementalSnapActiveGets whether increment snapping is active.
move获取或设置转换手柄的对齐增量。
rotate获取或设置旋转手柄的对齐增量。
scale获取或设置缩放手柄的对齐增量。
snapEnabledGets or sets whether snapping is enabled.

静态函数

ResetSnapSettings重置 EditorSnap 设置为默认值。

Events

gridSnapEnabledChangedCallback triggered when the grid snap enabled value changes.
snapEnabledChangedCalls the methods in its invocation list when the snapEnabled value changes .