https://github.com/instance-id/aboveaverageinspector
  
  
    A custom inspector drawer, because I wanted something I could organize into groups 
    https://github.com/instance-id/aboveaverageinspector
  
unity unity-editor unity3d unity3d-plugin
        Last synced: 4 months ago 
        JSON representation
    
A custom inspector drawer, because I wanted something I could organize into groups
- Host: GitHub
 - URL: https://github.com/instance-id/aboveaverageinspector
 - Owner: instance-id
 - License: mit
 - Created: 2020-10-01T22:43:46.000Z (about 5 years ago)
 - Default Branch: main
 - Last Pushed: 2020-11-23T06:13:39.000Z (almost 5 years ago)
 - Last Synced: 2025-06-26T21:04:15.995Z (4 months ago)
 - Topics: unity, unity-editor, unity3d, unity3d-plugin
 - Language: C#
 - Homepage:
 - Size: 1.22 MB
 - Stars: 10
 - Watchers: 1
 - Forks: 0
 - Open Issues: 0
 - 
            Metadata Files:
            
- Readme: README.md
 - License: LICENSE
 
 
Awesome Lists containing this project
README
          # AboveAverageInspector
A custom inspector drawer written using UIElements / UI Toolkit, because I wanted something I could organize into groups
### NOTE : Above-Average Inspector is a work in progress! 
While the majority of the functionality is present, there most assuredly are still bugs.  
(Known-Issue: Currently, the List items [ + ] Add and [ - ] Remove buttons are not working properly)
| With Above-Average Inspector           | Original Inspector                     |
| -------------------------------------- | -------------------------------------- |
|  |  |
### Categorize your fields
Use the ```[UICategory(name:"", order:0, expand:true)]``` attribute to draw your field in a category, order the categories, and decide if you want the category expanded by default.   

Uncategorized fields are automatically placed in a "Default" category.

## Animated Foldouts

## Compatibility with other Inspector modifications (Odin Inspector, possibly others, etc)
Odin Inspector injects it's drawers into default Unity inspectors. Above-Average Inspector is not forceful about it. As such, once Odin Inspector is added to a project it's drawers overtake as the default inspector drawer. 
If you would like AAI to still draw it's inspector changes, for whatever MonoBehaviours or ScriptableObjects you would like to use AAI you can create a simple CustomEditor for that object deriving from the AAIDefaultEditor and place it into any 'Editor' folder.
Using the included ExampleComponent in this project, if you would like to use AAI's drawer over Odin, follow these steps:
```
NOTE:
 I could make this a selectable and automated process with code generation. 
 
 I am interested to hear if anyone would like this or if just creating them manually 
 and having the control is preferred.)
```
1. In the 'Assets' folder of your project, create a new folder called 'Editor'
2. Within Assets/Editor, create a new script called "ExampleComponentEditor" 
3. Place the following code in the script):
Example is located in: Assets/instance.id/Example/Scripts/Editor/ExampleComponentEditor.cs
```cs
using UnityEditor;
namespace instance.id.AAI.Editors
{
    [CustomEditor(typeof(ExampleComponent))]
    public class ExampleComponentEditor : AAIDefaultEditor { }
}
```
if your script requires being in a custom namespace, change it appropriately, but then add the AAI/Editors namespaces as using statements as seen below:
```cs
using instance.id.AAI.Editors;
using UnityEditor;
namespace YourCustom.Namespace
{
    [CustomEditor(typeof(ExampleComponent))]
    public class ExampleComponentEditor : AAIDefaultEditor { }
}
```
This will produce the following result: 
The ExampleComponent object (Left) will use AAI, the Example2Component will use Odin Inspector (Right)

Tested with Odin Inspector 3.0.0.3 beta
---
