public void SetGizmoType(string gizmoType) { HideGizmo(); if (gizmoType != DCL.Components.DCLGizmos.Gizmo.NONE) { bool wasGizmoActive = IsGizmoActive(); for (int i = 0; i < gizmos.Length; i++) { if (gizmos[i].GetGizmoType() == gizmoType) { activeGizmo = gizmos[i]; activeGizmo.SetSnapFactor(snapInfo); break; } } bool areEntitiesSelected = selectedEntities != null && selectedEntities.Count > 0; if (wasGizmoActive && areEntitiesSelected) { ShowGizmo(); } else { GizmoStatusUpdate(); } } else { activeGizmo = null; } }
private void OnBeginDrag(DCLBuilderGizmoAxis hittedAxis) { isTransformingObject = true; activeGizmo = hittedAxis.GetGizmo(); activeGizmo.OnBeginDrag(hittedAxis, selectedEntitiesParent); OnGizmoTransformObjectStart?.Invoke(activeGizmo.GetGizmoType()); }
public void SetGizmo(DCLBuilderGizmo parentGizmo) { gizmo = parentGizmo; }