Skip to content

Latest commit

 

History

History
25 lines (20 loc) · 698 Bytes

README.md

File metadata and controls

25 lines (20 loc) · 698 Bytes

ComponentTitlebarGUI

Unity3d script that add callback to draw MGUI (without CustomEditor) in Inspector upon:

  • on any Component Titlebar
  • on GameObject Icon
  • on Material title preview

image_2024-10-24_04-19-10 image

Usage Example

[InitializeOnLoadMethod]
public static void Init()
{
  ComponentTitlebarGUI.OnTitlebarGUI += TestGUI;
}

private static void TestGUI(Rect rect, Object target)
{
  if (target is not MonoBehaviour) return;  
  GUI.Label(rect, EditorGUIUtility.IconContent("console.erroricon.sml"));
}