Example #1
0
    public override void OnInspectorGUI()
    {
        DrawDefaultInspector();

        float oldValue = curvePoint.zRotationDegree;

        curvePoint.zRotationDegree = EditorGUILayout.FloatField("zRotation", this.curvePoint.zRotationDegree) % 360;
        if (oldValue != curvePoint.zRotationDegree)
        {
            curvePoint.RecalculateRotation();
        }

        if (GUI.changed)
        {
            curvePoint.FirePositionChanged();
            EditorUtility.SetDirty(curvePoint);
        }
    }