protected override void Update()
        {
            base.Update();

            if (m_editor.Tools.IsViewing)
            {
                return;
            }

            if (!m_handle.IsWindowActive || !m_handle.Window.IsPointerOver)
            {
                return;
            }

            if (ChangePositionAction() && !m_handle.IsDragging && m_handle.SelectedAxis == RuntimeHandleAxis.None)
            {
                TerrainAreaHandle.ChangePosition();
            }

            if (FocusAction() && m_handle != null && m_handle.IsWindowActive)
            {
                IScenePivot pivot = m_editor.GetScenePivot();
                Vector3[]   areaResizerPositions = TerrainAreaHandle.AreaResizerPositions;
                pivot.Focus(m_handle.Position, Mathf.Max(TerrainAreaHandle.Appearance.HandleScale, (areaResizerPositions[1] - areaResizerPositions[0]).magnitude));
            }
        }
Exemplo n.º 2
0
        private void OnFocusClick()
        {
            IScenePivot scenePivot = Editor.GetWindow(RuntimeWindowType.Scene).IOCContainer.Resolve <IScenePivot>();

            scenePivot.Focus(FocusMode.Default);
        }