The UtilityButton is a UnityEditor extension that allows you to create macro-like buttons without using scripts.
The UtilityButton is allows you to create buttons that combine multiple process and frequently used functions to improve the efficiency of your development.
You can also assign shortcut keys to the buttons you create.
It is possible to assign shortcut keys to the buttons you create.
Buttoning up frequently used functions, assets to open (or select) and scenes to make them favorites.
Combining multiple steps into a single button
Log the values you want to know while debugging.
Combining multiple processes into a single button
Execute the MenuItem.
Open and select Assete.
Execute the Method in the script and change the value (private members can also be accessed).
Log output
Delay setting
Execute the MenuItem.
Edit button layout
Open Asset
Changing the value in Component
Select [Tools > Utility Button > Setting] to open the whole edit window.
Edit window for each button, right-click the button
Edit: Toggles the edit view on the button
Copy: Copy the button (Json data)
Paste: Overwrite the copied button
Paste+: Add a copied button
+: Add a button
-: Delete button
Name: The name to display on the button.
Tooltip: Setting of the Tooltip when the cursor is on it
New Line: Move the button to a new line or
Space: the size of the space to the left of the button
Width: Width of the button
Height: Height of the button
Color: Button Color
Font Color: The color of the name
Shortcut Key: Select the key you want to assign to the shortcut key.
UtilityButtonShortcut.cs is created automatically every time you edit [Shortcut Key], and then the
This is registered as a shortcut for MenuItem.
Copy: Copy the button (Json data)
Paste: Overwrite the copied button
Paste+: Add a copied button
+: Add a button
-: Delete button
Type is the type of process to be performed.
The types are as follows
None: do nothing
MenuItem: Execute the Unity MenuItem
OpenAsset: Opens the specified Asset.
SelectAsset: Select the specified Asset
Log: Log your settings to a log file.
Delay: Wait for the specified number of seconds
StaticMethod: Runs the specified Static Method.
CompnentMethod: Searches for a GameObject and executes Component's Method.
SetStaticMemberValue: Assign the specified value to Static Menber.
SetComponentMemberValue: Searches for a GameObject and assigns a value to Component
Execute Unity's MenuItem.
Separate the menu item with a / delimiter.
Set [GameObject/3D Object/Cube] as shown in the following image
Select the asset you want to open or select.
Set the Asset to open and select the Asset.
Below is the case of OpenAsset.
Outputs Arg values to a Log.
When multiple Arg values are set, they can be combined in a single Log.
Set the waiting time.
Time(Sec): Enter the waiting time in seconds
Execute the specified Static Method.
Class: Specify the class name including namespace. You can select the classes that match the search after typing.
Method: Method name (you can also access private).
Click here to see how to set up Arg in detail.
The video below shows the Method in the image on the right, where the argument is an int.
Specifies the GameObject on the Hierarchy and executes the Method of the GameObject's Component.
GameObject: Specify the name of the Hierarchy's GameObject (you can also specify it with a / separator).
Class: Specify the class name including namespace. You can select the classes that match the search after typing.
Method: Method name (can also be accessed by private).
Click here to see how to set up Arg in detail.
The video below shows the Method with no arguments in the image on the right.
Assign the value to Static Member.
Class: Specify the class name including namespace. You can select the class which matches the search.
Member: Member name (private, and you can also access properties).
The value to be assigned is Arg 0.
Specifies a GameObject on the Hierarchy and assigns a value to the Member of the GameObject's Component.
GameObject: Specifies the name of the Hierarchy's GameObject (or separate it with a / character).
Class: Specify the class name including namespace. You can select the class that matches the search after inputting the name.
Member: Member name (You can also access to private).
The value to be assigned is Arg 0.
+: Add a button
-: Delete button
Int: Set an int type value.
Float: Set a float value.
Bool: On/Off for the bool values.
String: Sets the string.
Vector3: Set a xyz float value
Enum: Enum is set to an integer value
Asset: Set the Asset
AssetArray: Set the Asset array.
GameObject: Set the GameObject name in Hierarchy
Component: Set GameObject and Component name.
Component Member: Set the names of the Component and Component members.
Static Member: Set the class name and member name.
Enter an integer value in the TextBox
Enter a real number in the TextBox
Check box to toggle true or false
Enter a text in the TextBox
Enter real numbers in the TextBox. From left to right: xyz
Enter an integer value in the TextBox. (You cannot set the enum name.)
Set an Asset to an ObjectField
Click the + or - button to increase or decrease an ObjectField.
Set an Asset to an ObjectField.
Specify the GameObject name in the TextBox. (You can also specify it with a / delimiter.)
Specify the GameObject name in the GameObject TextBox. (You can also specify it with a / delimiter.)
Specify the Component name in the Component's TextBox. You can select a class that matches the search after you enter it.
Specify the GameObject name in the GameObject TextBox. (You can also specify it with a / delimiter.)
Specify the Component name in the Component's TextBox. You can select a class that matches the search after you enter it.
The Member name is specified in the TextBox of Member. (You can also access private. Property is also accessible.
Specify the Class name in the TextBox of Class. You can select a class that matches the search after you enter it.
The Member name is specified in the TextBox of Member. (You can also access private. Property is also accessible.
Pressing the Copy button saves the Json data to the clipboard.
Press Paste button to paste the Json data if it is correct.