EditorWindow. Display array dropdown

I’m trying to make my own editor window, and i want to be able to display an array.
(like this)
37361-array.png

maybe some GUILayout or something???

string[] strings;

strings = EditorGUILayout.MagicalArrayInputFields(strings);

How to accomplish it?
thanks in advance!

PropertyField will display arrays correctly. You have to set the parameter “showChildren” to true.

public class MyEditorWindow : EditorWindow
{
    [MenuItem("Window/My Editor Window")]
    public static void ShowWindow()
    {
        GetWindow<MyEditorWindow >();
    }

    public string[] Strings = { "Larry", "Curly", "Moe" };
    
    void OnGUI()
    {
        // "target" can be any class derrived from ScriptableObject 
        // (could be EditorWindow, MonoBehaviour, etc)
        ScriptableObject target = this;
        SerializedObject so = new SerializedObject(target);
        SerializedProperty stringsProperty = so.FindProperty("Strings");

        EditorGUILayout.PropertyField(stringsProperty, true); // True means show children
        so.ApplyModifiedProperties(); // Remember to apply modified properties
    }
}

@AdamScura - Thank you very much for this example. Works perfectly