UnityEditor.TransformManipulator.DebugAlignment C# (CSharp) Method

DebugAlignment() public static method

public static DebugAlignment ( Quaternion targetRotation ) : void
targetRotation UnityEngine.Quaternion
return void
        public static void DebugAlignment(Quaternion targetRotation)
        {
            if (s_MouseDownState != null)
            {
                for (int i = 0; i < s_MouseDownState.Length; i++)
                {
                    s_MouseDownState[i].DebugAlignment(targetRotation);
                }
            }
        }

Usage Example

示例#1
0
        public override void ToolGUI(SceneView view, Vector3 handlePosition, bool isStatic)
        {
            Quaternion targetRotation = (Selection.transforms.Length <= 1) ? Tools.handleLocalRotation : Tools.handleRotation;

            TransformManipulator.DebugAlignment(targetRotation);
            if (Event.current.type == EventType.MouseDown)
            {
                s_CurrentScale = Vector3.one;
            }
            EditorGUI.BeginChangeCheck();
            TransformManipulator.BeginManipulationHandling(true);
            s_CurrentScale = Handles.ScaleHandle(s_CurrentScale, handlePosition, targetRotation, HandleUtility.GetHandleSize(handlePosition));
            TransformManipulator.EndManipulationHandling();
            if (EditorGUI.EndChangeCheck() && !isStatic)
            {
                TransformManipulator.SetScaleDelta(s_CurrentScale, targetRotation);
            }
        }
All Usage Examples Of UnityEditor.TransformManipulator::DebugAlignment