A game about forced loneliness, made by TACStudios
1using UnityEditor.EditorTools;
2using UnityEngine;
3
4namespace UnityEditor.Tilemaps
5{
6 /// <summary>
7 /// An `EditorTool` for handling Moves for a `GridSelection`.
8 /// </summary>
9 public class GridSelectionMoveTool : GridSelectionTool
10 {
11 private static class Styles
12 {
13 public static GUIContent toolbarIcon = EditorGUIUtility.TrTextContentWithIcon("Move", "Shows a Gizmo in the Scene view for changing the offset for the Grid Selection", "MoveTool");
14 }
15
16 /// <summary>
17 /// Toolbar icon for the `GridSelectionMoveTool`.
18 /// </summary>
19 public override GUIContent toolbarIcon => Styles.toolbarIcon;
20
21 /// <summary>
22 /// Handles the gizmo for managing Moves for the `GridSelectionMoveTool`.
23 /// </summary>
24 /// <param name="position">Position of the `GridSelection` gizmo.</param>
25 /// <param name="rotation">Rotation of the `GridSelection` gizmo.</param>
26 /// <param name="scale">Scale of the `GridSelection` gizmo.</param>
27 public override void HandleTool(ref Vector3 position, ref Quaternion rotation, ref Vector3 scale)
28 {
29 position = Handles.PositionHandle(position, rotation);
30 }
31 }
32}