nima265 / EditorList

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

EditorList

Unity 2020.3+

With this class, from now on you can display your lists in the editor window visually!!

Usage

  1. Add EditorList to your project in Editor folder.
  2. Create a Sample Editor Window Class
  3. Create variable from them

Sample

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);
    }
}

Preview

About

License:MIT License


Languages

Language:C# 100.0%