ドキュメント

Unity Engine

Unity Engine

SnapToGrid

Rounds each Transform.position or Vector3 to the closest multiple of EditorSnapSettings.gridSize.
読み終わるまでの所要時間 1 分最終更新 1ヶ月前

Definition

  • Type: Method
  • Namespace: UnityEditor
  • Assembly: UnityEditor.CoreModule

SnapToGrid(Transform[], SnapAxis)

Rounds each Transform.position or Vector3 to the closest multiple of EditorSnapSettings.gridSize.
public static void SnapToGrid(Transform[] transforms, SnapAxis axis = SnapAxis.All)

Parameters

transforms

The transforms to snap.

The axes on which to apply snapping.

SnapToGrid(Vector3[], SnapAxis)

Rounds each Transform.position or Vector3 to the closest multiple of EditorSnapSettings.gridSize.
public static void SnapToGrid(Vector3[] positions, SnapAxis axis = SnapAxis.All)

Parameters

positions

The positions to snap.

The axes on which to apply snapping.