public static void Open(UnityEngine.Object obj, FieldInfo field, GUIContent content) { ArrayWindow window = EditorWindow.GetWindow <ArrayWindow>(field.Name); window.field = field; window.content = content; window.serializedObject = new SerializedObject(obj); window.prop = window.serializedObject.FindProperty(field.Name); }
public void DrawDirectly(SerializedProperty property, CyberAttrribute atribute, GUIContent content, GUIStyle style, FieldInfo field) { content.text += $" {{size:{property.arraySize}}}"; EditorGUILayout.BeginHorizontal(); EditorGUILayout.PrefixLabel(content, new GUIStyle(), style); if (GUILayout.Button("Open")) { ArrayWindow.Open(CyberEdit.Current.Target, field, content); } EditorGUILayout.EndHorizontal(); }