Skip to content

Instantly share code, notes, and snippets.

@kraj0t
Last active March 27, 2022 15:32
Show Gist options
  • Save kraj0t/f8ecc357f0802464446f17f8d7bee122 to your computer and use it in GitHub Desktop.
Save kraj0t/f8ecc357f0802464446f17f8d7bee122 to your computer and use it in GitHub Desktop.
Extend Unity's Image editor with custom inspector GUI
using UnityEditor;
using UnityEditor.UI;
using UnityEngine;
using UnityEngine.UI;
[CustomEditor(typeof(Image))]
public class CustomImageEditor : ImageEditor
{
public override void OnInspectorGUI()
{
GUILayout.Button("my button");
base.OnInspectorGUI();
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment