@@ -357,10 +357,9 @@ public static bool RenderIndentedButton(GUIContent content, GUIStyle style, para
357357 /// <returns><see langword="true"/> if button clicked, <see langword="false"/> if otherwise.</returns>
358358 public static bool RenderIndentedButton ( Func < bool > renderButton )
359359 {
360- bool result = false ;
361360 GUILayout . BeginHorizontal ( ) ;
362361 GUILayout . Space ( EditorGUI . indentLevel * 15 ) ;
363- result = renderButton ( ) ;
362+ bool result = renderButton ( ) ;
364363 GUILayout . EndHorizontal ( ) ;
365364 return result ;
366365 }
@@ -951,11 +950,7 @@ public static float AxisMoveHandle(Object target, Vector3 origin, Vector3 direct
951950
952951 Handles . DrawDottedLine ( origin , position , DottedLineScreenSpace ) ;
953952 Handles . ArrowHandleCap ( 0 , position , Quaternion . LookRotation ( direction ) , handleSize * 2 , EventType . Repaint ) ;
954- #if UNITY_2022_1_OR_NEWER
955953 Vector3 newPosition = Handles . FreeMoveHandle ( position , handleSize , Vector3 . zero , Handles . CircleHandleCap ) ;
956- #else
957- Vector3 newPosition = Handles . FreeMoveHandle ( position , Quaternion . identity , handleSize , Vector3 . zero , Handles . CircleHandleCap ) ;
958- #endif
959954
960955 if ( recordUndo )
961956 {
@@ -992,11 +987,7 @@ public static Vector3 CircleMoveHandle(Object target, Vector3 position, float xS
992987 handleSize = Mathf . Lerp ( handleSize , HandleUtility . GetHandleSize ( position ) * handleSize , 0.75f ) ;
993988 }
994989
995- #if UNITY_2022_1_OR_NEWER
996990 Vector3 newPosition = Handles . FreeMoveHandle ( position , handleSize , Vector3 . zero , Handles . CircleHandleCap ) ;
997- #else
998- Vector3 newPosition = Handles . FreeMoveHandle ( position , Quaternion . identity , handleSize , Vector3 . zero , Handles . CircleHandleCap ) ;
999- #endif
1000991
1001992 if ( recordUndo && position != newPosition )
1002993 {
@@ -1032,11 +1023,7 @@ public static Vector3 SquareMoveHandle(Object target, Vector3 position, float xS
10321023 }
10331024
10341025 // Multiply square handle to match other types
1035- #if UNITY_2022_1_OR_NEWER
10361026 Vector3 newPosition = Handles . FreeMoveHandle ( position , handleSize * 0.8f , Vector3 . zero , Handles . RectangleHandleCap ) ;
1037- #else
1038- Vector3 newPosition = Handles . FreeMoveHandle ( position , Quaternion . identity , handleSize * 0.8f , Vector3 . zero , Handles . RectangleHandleCap ) ;
1039- #endif
10401027
10411028 if ( recordUndo && position != newPosition )
10421029 {
@@ -1072,11 +1059,7 @@ public static Vector3 SphereMoveHandle(Object target, Vector3 position, float xS
10721059 }
10731060
10741061 // Multiply sphere handle size to match other types
1075- #if UNITY_2022_1_OR_NEWER
10761062 Vector3 newPosition = Handles . FreeMoveHandle ( position , handleSize * 2 , Vector3 . zero , Handles . SphereHandleCap ) ;
1077- #else
1078- Vector3 newPosition = Handles . FreeMoveHandle ( position , Quaternion . identity , handleSize * 2 , Vector3 . zero , Handles . SphereHandleCap ) ;
1079- #endif
10801063
10811064 if ( recordUndo && position != newPosition )
10821065 {
@@ -1146,12 +1129,7 @@ public static Vector3 VectorHandle(
11461129
11471130 // Draw a line from origin to origin + direction
11481131 Handles . DrawLine ( origin , handlePosition ) ;
1149-
1150- #if UNITY_2022_1_OR_NEWER
11511132 Vector3 newPosition = Handles . FreeMoveHandle ( handlePosition , handleSize , Vector3 . zero , Handles . DotHandleCap ) ;
1152- #else
1153- Vector3 newPosition = Handles . FreeMoveHandle ( handlePosition , Quaternion . identity , handleSize , Vector3 . zero , Handles . DotHandleCap ) ;
1154- #endif
11551133
11561134 if ( recordUndo && handlePosition != newPosition )
11571135 {
0 commit comments