TODO
Unity 2018.x or newer
Copy and paste Editor Toolbox
directory into your project (basically into Asset
directory or somewhere deeper).
Drawers based on build-in classes PropertyDrawer/DecoratorDrawer and associated PropertyAttribute.
Editor Toolbox/Scripts/Attributes/
Editor Toolbox/Editor/Drawers/
[System.Flags]
public enum FlagExample
{
Nothing = 0,
Flag1 = 1,
Flag2 = 2,
Flag3 = 4,
Everything = ~0
}
[EnumFlag]
public FlagExample enumFlag = FlagExample.Flag1 | FlagExample.Flag2;
Drawers based on classes ToolboxDrawer and associated ToolboxAttribute.
For proper work they need at least one settings file located in your project.
Predefined one - Editor Toolbox/EditorSettings.asset
.
Editor Toolbox/Scripts/Attributes/ToolboxAttributes
Editor Toolbox/Editor/Drawers/ToolboxDrawers
Display/create something before and after property in desired order(using Order property).
In fact ToolboxAreaDrawers are like extended version of DecoratorDrawers.
[BeginGroup("Group1")]
public int var1;
public int var2;
public int var3;
[EndGroup]
public int var4;
[BeginIndent]
public int var1;
public int var2;
public int var3;
[EndIndent]
public int var4;
[SpaceArea(spaceBefore = 10.0f, spaceAfter = 5.0f)]
public int var1;
[ReorderableList(ListStyle.Round)]
public List<string> standardStyleList;
[InLineEditor]
public Transform var1;
Hides any property.
Same like standard PropertyDrawer for ConditionalHideAttribute but works with Enum types and arrays/lists.
Can be used additionally to any PropertyDrawer or ToolboxPropertyDrawer.
Disables any property.
Can be used additionally to any PropertyDrawer or ToolboxPropertyDrawer.
Same like standard PropertyDrawer for ConditionalDisableAttribute but works with Enum types and arrays/lists.
Can be used additionally to any PropertyDrawer or ToolboxPropertyDrawer.
[Disable, ReorderableList]
public int[] vars1 = new [] { 1, 2, 3, 4 };
Editor Toolbox/Editor/Internal/ReorderableList.cs
Custom implementation of standard ReorderableList(UnityEditorInternal). Useable as attribute in inspector fields or single object in custom editors.
var list = new ReorderableList(SerializedProperty property, string elementLabel, bool draggable, bool hasHeader, bool fixedSize);
[ReorderableList(ListStyle.Lined, "Item")]
public List<int> linedStyleList;
[ReorderableList(ListStyle.Round)]
public List<string> standardStyleList;
[ReorderableList(ListStyle.Boxed, fixedSize: true)]
public GameObject[] boxedStyleList = new GameObject[4];
Editor Toolbox/Editor/Tools/Editors/TerrainToolEditor.cs
Editor Toolbox/Editor/ToolboxEditorHierarchy.cs
TODO
Editor Toolbox/Editor/Tools/Wizards/ViewGeneratorWizard.cs
Editor Toolbox/Editor/Tools/Wizards/GridGeneratorWizard.cs