void DrawSelectedIndexPoint() { GUILayout.Label("Selected Point"); EditorGUI.BeginChangeCheck(); Vector3 p = EditorGUILayout.Vector3Field("point position", curve[m_nSelectedIndex]); if (EditorGUI.EndChangeCheck()) { Undo.RecordObject(curve, "Change Point"); curve[m_nSelectedIndex] = p; EditorUtility.SetDirty(curve); } EditorGUI.BeginChangeCheck(); eBezierLineConstrainedMode mode = (eBezierLineConstrainedMode)EditorGUILayout.EnumPopup(curve.GetModeByPointIndex(m_nSelectedIndex)); if (EditorGUI.EndChangeCheck()) { Undo.RecordObject(curve, "Change Mode"); curve.SetBezierLineConstrainedMode(m_nSelectedIndex, mode); EditorUtility.SetDirty(curve); } }
public void SetBezierLineConstrainedMode(int index, eBezierLineConstrainedMode mode) { m_eMode[(index + 1) / 3] = mode; EnforceMode(index); }