Skip to content

Unity3d script that add callback to draw MGUI upon any Component Titlebar

License

Notifications You must be signed in to change notification settings

mitay-walle/ComponentTitlebarGUI

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 

Repository files navigation

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"));
}

About

Unity3d script that add callback to draw MGUI upon any Component Titlebar

Topics

Resources

License

Stars

Watchers

Forks

Languages