public void OnGizmoSwitched(IHandleGizmo nextGizmo) { bool wasActive = currentGizmo.IsActive(); currentGizmo.SetActive(false); currentGizmo = nextGizmo; currentGizmo.SetGizmoOnTarget(multiHolder); currentGizmo.SetActive(wasActive); }
public TransformManipulatorManager() { Service.Events.AddListener(EventId.EntitiesSelected, OnEntitiesSelected); rotationHandle = new RotationHandle(); rotationHandle.Start(); translationHandle = new TranslationHandle(); translationHandle.Start(); Service.FrameUpdate.RegisterForUpdate(this); GameObject multiHolderGameObject = new GameObject(); multiHolder = multiHolderGameObject.transform; currentGizmo = translationHandle; }