Com Sibz Editor List by Sibz - 1


This packages enables lists that can be nicely displayed in the editor. It's fully extensible.

Unknown VersionUnknown LicenseUpdated 98 days agoCreated on November 9th, 2019
Go to source


This packages enables lists that can be nicely displayed in the editor. It’s fully extensible.

Contains two implementations:

  • UnorderedGameObjectList
  • OrderedGameObjectList

Both are very similar, they display a list of game objects, however the ordered one has ordering buttons.


using UnityEditor;
using UnityEngine;

public class MyTestMono : MonoBehaviour
   public UnorderedGameObjectList GameObjectsList1;
   public OrderedGameObjectList GameObjectsList2;

// This is required to enable the use of GUILayout. Can also be put in own file.
[CustomEditor(typeof(MyTestMono)), CanEditMultipleObjects]
public class MyTestMonoCI : Editor{}

This should give you something similar to:


List of Custom (Unity)Objects

Implement as above but define your own EditList and ObjectListDrawer. T Must derive from UnityEngine.Object.


using System;
using UnityEngine;
using Sibz.EditorList;

public class OrderedColliderList : EditorList<Collider> { }


using Sibz.EditorList.Editor;
using UnityEditor;

public class OrderedColliderListDrawer : ObjectListDrawer<Collider> { }

List of anything

Anything can be listed, you either have to write a custom property drawer for the object you are listing, or override the default ListView.

  1. If you made your CustomPropertyDrawer for the property on the list:
public class CustomObject {
   public string Name;
public class OrderedCustomObjectList : EditorList<CustomObject> { }

Note overriding ListDrawer here (not ObjectListDrawer):

public class CustomObjectListDrawer : ListDrawer<CustomObject> { }
  1. If you want to do your own thing for the item, then you have to override ListDrawer.ListItemDrawer:
public class CustomObjectListDrawer : ListDrawer<CustomObject>
  protected override void ListItemDrawer(SerializedProperty listProperty, SerializedProperty listItemProperty, int index)

Custom List Result:


Show all projects by Sibz