Skip to content

Instantly share code, notes, and snippets.

@kou-yeung
Last active July 30, 2018 02:18
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kou-yeung/3d47b5fdfe6a1b0ee293797000ede36e to your computer and use it in GitHub Desktop.
Save kou-yeung/3d47b5fdfe6a1b0ee293797000ede36e to your computer and use it in GitHub Desktop.
/// Path : Editor\CreatedUI.cs
using UnityEditor.UI;
using UnityEngine.UI;
using UnityEditor;
[InitializeOnLoad]
public static class CreatedUI
{
static CreatedUI()
{
MenuOptions.OnCreatedButton += OnCreatedButton;
}
static void OnCreatedButton(Button btn)
{
btn.gameObject.AddComponent<ButtonSE>();
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment