Created
September 11, 2025 23:41
-
-
Save baba-s/b10a02d2edecc95cbe30ba0b0b85ed23 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| using UnityEditor; | |
| using UnityEditor.Toolbars; | |
| using UnityEngine; | |
| public static class Example | |
| { | |
| [MainToolbarElement( "ピカチュウ", defaultDockPosition = MainToolbarDockPosition.Middle )] | |
| public static MainToolbarElement Create() | |
| { | |
| var image = ( Texture2D )EditorGUIUtility.IconContent( "SettingsIcon" ).image; | |
| var content = new MainToolbarContent( image ); | |
| return new MainToolbarButton | |
| ( | |
| content: content, | |
| action: () => Debug.Log( "ピカチュウ" ) | |
| ); | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment