void displayScale(BezierPath p) { p.DoScale = EditorGUILayout.Toggle("Enable Scale", p.DoScale); for (int i = 0; i < p.NumPoints; i++) { p.GetPoint(i).Scale = EditorGUILayout.FloatField("Point " + i.ToString() + " scale:", p.GetPoint(i).Scale); } }
void displayTime(BezierPath p) { for (int i = 0; i < p.NumPoints; i++) { EditorGUILayout.BeginHorizontal(); float prev = p.GetPoint(i).TimeStamp; p.GetPoint(i).TimeStamp = EditorGUILayout.FloatField("Point " + i.ToString(), p.GetPoint(i).TimeStamp); if(prev!=p.GetPoint(i).TimeStamp) SceneView.RepaintAll(); p.GetPoint(i).Curve=EditorGUILayout.CurveField(p.GetPoint(i).Curve); EditorGUILayout.EndHorizontal(); } if (GUILayout.Button("Calculate By Length")) { p.CalculateTimesByLength(); SceneView.RepaintAll(); } }