Game Development Reference
In-Depth Information
Note The specifics and details of this code are not explained here because it's not critical to developing
CMOD. The Batch Rename tool is simply provided to help improve your general workflow. More details
on the implementation of this tool, and others, are covered in the Apress Book Learn Unity for 2D Game
Development, available at www.apress.com/9781430262299 .
To install the Batch Rename tool into any project in Unity, first create a new folder named Editor
in the Project panel (if there's not already a folder with this name). And then drag and drop the
BacthRename.cs source file from Windows Explorer or Mac Finder into the Editor folder in the
project. This imports the source file and stores inside the Editor folder (see Figure 1-26 ).
Figure 1-26. Importing the Batch Rename tool into the Editor folder
Note The Editor folder is a special folder in a Unity project. Source files inside this folder are recognized
by the Editor as being Editor Extensions—as defining behavior, customizing how the editor works.
Once BacthRename.cs has been copied to the Editor folder, it's is ready to use! Let's give it a test run
and rename some objects in the active scene. Create some empty objects using GameObject
Create Empty (these are going to be renamed). Then select those objects in the Hierarchy panel.
Once selected, access the Batch Rename tool by selecting Edit Batch Rename from the Editor
menu (note that this option is only available if BacthRename.cs is inside the Editor folder). Clicking
this displays the Batch Rename tool, as shown in Figure 1-27 .
 
Search WWH ::




Custom Search