The Bounding Box Editor is a Unity tool designed to streamline the process of editing bounding boxes for meshes in a prefab. This tool is especially useful for adjusting Skinned Mesh Renderers and Mesh Filters, allowing you to globally modify the center and extent of bounding boxes.
- Global Adjustments: Modify the center and extent of all bounding boxes under a selected prefab.
- Supports Multiple Mesh Types: Works seamlessly with both Skinned Mesh Renderers and Mesh Filters.
- Batch Editing: Adjust all meshes in a prefab simultaneously for consistency and efficiency.
-
Import the Script:
- You can either directly add the
BoundingBoxEditor.csscript to a folder namedEditorin your Unity project, or import the.unitypackagefile provided.
- You can either directly add the
-
Open the Tool:
- In the Unity Editor, navigate to
Tools > Bounding Box Editor.
- In the Unity Editor, navigate to
-
Select a Prefab:
- Drag and drop the desired prefab into the tool's interface.
-
Adjust Bounding Boxes:
- Modify the center and extent values in the tool to update all bounding boxes under the prefab.
- Unity 2020.3 or newer.
- A Unity project with prefabs containing Skinned Mesh Renderers or Mesh Filters.
Adjusting bounding boxes is critical for ensuring accurate collision detection, lighting, and other mesh-related operations. Use this tool to:
- Optimize bounding boxes for imported prefabs.
- Standardize bounding box dimensions across multiple meshes.
Contributions, issues, and feature requests are welcome! Feel free to fork the repo and submit pull requests.
This project is licensed under the MIT License. See the LICENSE file for details.