@@ -237,6 +237,12 @@ void DrawBezierPathInspector()
237237 data . showPathBounds = GUILayout . Toggle ( data . showPathBounds , new GUIContent ( "Show Path Bounds" ) ) ;
238238 data . showPerSegmentBounds = GUILayout . Toggle ( data . showPerSegmentBounds , new GUIContent ( "Show Segment Bounds" ) ) ;
239239 data . displayAnchorPoints = GUILayout . Toggle ( data . displayAnchorPoints , new GUIContent ( "Show Anchor Points" ) ) ;
240+
241+ if ( data . displayAnchorPoints )
242+ {
243+ data . displayAnchorNumbers = GUILayout . Toggle ( data . displayAnchorNumbers , new GUIContent ( "Show Anchor Numbers" ) ) ;
244+ }
245+
240246 if ( ! ( bezierPath . ControlPointMode == BezierPath . ControlMode . Automatic && globalDisplaySettings . hideAutoControls ) )
241247 {
242248 data . displayControlPoints = GUILayout . Toggle ( data . displayControlPoints , new GUIContent ( "Show Control Points" ) ) ;
@@ -366,8 +372,7 @@ void OnSceneGUI()
366372
367373 void DrawVertexPathSceneEditor ( )
368374 {
369-
370- Color bezierCol = globalDisplaySettings . bezierPath ;
375+ Color bezierCol = globalDisplaySettings . bezierPath ;
371376 bezierCol . a *= .5f ;
372377
373378 if ( data . showBezierPathInVertexMode )
@@ -379,6 +384,7 @@ void DrawVertexPathSceneEditor()
379384 {
380385 points [ j ] = MathUtility . TransformPoint ( points [ j ] , creator . transform , bezierPath . Space ) ;
381386 }
387+
382388 Handles . DrawBezier ( points [ 0 ] , points [ 3 ] , points [ 1 ] , points [ 2 ] , bezierCol , null , 2 ) ;
383389 }
384390 }
@@ -519,8 +525,7 @@ void ProcessBezierPathInput(Event e)
519525
520526 void DrawBezierPathSceneEditor ( )
521527 {
522-
523- bool displayControlPoints = data . displayControlPoints && ( bezierPath . ControlPointMode != BezierPath . ControlMode . Automatic || ! globalDisplaySettings . hideAutoControls ) ;
528+ bool displayControlPoints = data . displayControlPoints && ( bezierPath . ControlPointMode != BezierPath . ControlMode . Automatic || ! globalDisplaySettings . hideAutoControls ) ;
524529 Bounds bounds = bezierPath . CalculateBoundsWithTransform ( creator . transform ) ;
525530
526531 if ( Event . current . type == EventType . Repaint )
@@ -661,6 +666,22 @@ void DrawHandle(int i)
661666 }
662667 }
663668
669+ if ( isAnchorPoint && data . displayAnchorNumbers )
670+ {
671+ var handleNumberText = $ "{ i / 3 + 1 } ";
672+
673+ GUIStyle handleNumberTextStyle = new GUIStyle
674+ {
675+ normal =
676+ {
677+ textColor = globalDisplaySettings . anchorNumberColor
678+ } ,
679+ fontSize = globalDisplaySettings . anchorNumberSize
680+ } ;
681+
682+ Handles . Label ( handlePosition , handleNumberText , handleNumberTextStyle ) ;
683+ }
684+
664685 switch ( handleInputType )
665686 {
666687 case PathHandle . HandleInputType . LMBDrag :
0 commit comments