Skip to content

Instantly share code, notes, and snippets.

@kinifi
Last active September 9, 2016 18:17
Show Gist options
  • Save kinifi/ac0526eee85cfe5915e9d9111b5c182a to your computer and use it in GitHub Desktop.
Save kinifi/ac0526eee85cfe5915e9d9111b5c182a to your computer and use it in GitHub Desktop.
How to override an inspector and change how it looks in the Editor along with opening a Editor Extension
/*
* 1. Must be located in a "Editor" Folder in your Assets folder
* 2. Must have a script that is in the "typeof(SCRIPT HERE)" line that exists
*/
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEditor;
[CustomEditor(typeof(CLASSNAME))]
//uncomment if needed
//[CanEditMultipleObjects]
public class NewInspector : Editor
{
public override void OnInspectorGUI()
{
GUILayout.Label("I'm an awesome label", EditorStyles.helpBox);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment