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);
}
}
}