using System.Collections; using System.Collections.Generic; using UnityEngine; using UnityEditor; using UnityEditor.UI; [CustomEditor(typeof(PolygonUIMesh))] public class PolygonUIMeshEditor : ImageEditor { SerializedProperty points; protected override void OnEnable() { base.OnEnable(); points = serializedObject.FindProperty("points"); } public override void OnInspectorGUI() { serializedObject.Update(); base.OnInspectorGUI(); EditorGUILayout.PropertyField(points); serializedObject.ApplyModifiedProperties(); } }