Beispiel #1
0
    /// <summary>
    /// Generate points based on bezier spline
    /// </summary>
    private void InspectorSplineGenerationGUI()
    {
        GUIStyle s = new GUIStyle(EditorStyles.largeLabel);

        s.fontStyle = FontStyle.Bold;

        GUILayout.Label("Bezier", s);

        EditorGUILayout.PropertyField(spline, new GUIContent("Spline"));
        EditorGUILayout.PropertyField(splinePoinsAmount, new GUIContent("Points on spline"));
        if (GUILayout.Button("Generate"))
        {
            if (EditorUtility.DisplayDialog("Generate new points", "Generation will delete all already exists points.\nAre you shure?", "Yes", "No"))
            {
                _target.GeneratePointsOnBezier();
                SceneView.RepaintAll();
            }
        }
    }