With this class, from now on you can display your lists in the editor window visually!!
- Add EditorList to your project in Editor folder.
- Create a Sample Editor Window Class
- Create variable from them
using UnityEditor;
using UnityEngine;
public class Preview : EditorWindow
{
EditorList<GameObject> gameObjects = new EditorList<GameObject>();
[MenuItem("Tools/Preview")]
public static void ShowWindow()
{
Preview window = (Preview)GetWindow(typeof(Preview));
window.Show();
}
private void OnGUI()
{
gameObjects.DrawList(nameof(gameObjects), position);
}
}