MD Package Technical & APi Documentation
MD_MeshEditorRuntimeAxisGizmo
Namespace: MDPackage
MD_MeshEditorRuntimeAxisGizmo is a vertex manipulaton tool at runtime using the axis-gizmo style for PC/Mobile.
It requires a target component of type MD_MeshProEditor with generated gameObject points generated on the mesh.
User uses a mouse or a finger to create a rectangular selection in screen space to select mesh points. Once points are selected, user can manipulate with these points by using the well known arrow axis X,Y,Z (or custom) to move the selected points in world space.
Read more here (Online documentation slide)
Properties
// Target camera is required in order to work with screen space coordinates
public Camera TargetCamera { get; set; }

// Arrow-axis component - required
public MDRuntimeAxisController TargetAxisGizmo { get; set; }

// Arrow axis manipulation move speed/ delta multiplier
public float MoveDeltaMultiplier { get; set; }
// Screen space rect selection panel color
public Color SelectionGizmoColor { get; set; }
// If no drag/drop rect selection is processed, default click rect must be created. Define the default one-click rect size in screen space pixels
public int SelectionClickRectInPixels { get; set; }
// Snap arrow axis movement on grid
public bool SnapAxisMoveDelta { get; set; }
public float SnapGridSize { get; set; } // The higher the value, the more snappy the movement is

// Has the runtime mesh editor selected any points?
public bool HasSelectedPoints { get; }
// Readonly collection of selected points
public IReadOnlyCollection<GeneratedMeshPoint> SelectedPoints { get; }

// Input Hookups - use for your own input handler

// Hookup a custom input for screen space cursor/ point/ touch
public Vector3 InputHook_GenericScreenPosition { get; set; }
// Hookup a generic input for main button down and up
public bool InputHook_GenericButtonDown { get; set; }
// Hookup a generic input for adding points to the current selection (eg. left shift)
public bool InputHook_AddToSelection { get; set; }
// Hookup a generic input for removing points from the current selection (eg. left control)
public bool InputHook_RemoveFromSelection { get; set; }
Events
public event System.Action OnPointsSelected;
public event System.Action OnPointsDeselected;
public event System.Action OnPointsMoved;
Public Methods
// Try to select cached mesh points in screen space
public void TrySelectPoints(Vector2 rectMinInScreenSpace, Vector2 rectMaxInScreenSpace, PointSelectionType selectionType = PointSelectionType.Override)

// Deselect currently selected gameObject mesh points
public void DeselectPoints()