# Unity Prefab Collider Generator ### Unity PCG Generates a ``BoxCollider`` Encapsulating Every Child ``Mesh``, ``Collider`` or ``Transform`` [![Made for Unity](https://img.shields.io/badge/Made%20for-Unity-57b9d3.svg?style=for-the-badge&logo=unity&color=blueviolet)](https://unity3d.com) <div display="inline"> <img src=".documentation/Unity%20Collider%20Generator%20Wiki%20-%20From%20Meshes.png" width="248" height="217"> <img src=".documentation/Unity%20Collider%20Generator%20Wiki%20-%20From%20Colliders.png" width="248" height="217"> <img src=".documentation/Unity%20Collider%20Generator%20Wiki%20-%20From%20Transforms.png" width="248" height="217"> <img src=".documentation/Unity%20Collider%20Generator%20Wiki%20-%20Inspector%20Window.png"> <br> </div> ### Instructions 1. Add the Prefab Collider Generator Script onto any gameobject 2. Change the target GameObject if needed 3. Select the generation mode : From `Meshes` / `Colliders` / `Transforms`, depending on you needs 4. Click on `Generate Collider` ### Additional Features - Click `Clear Duplicate Colliders` to remove unnecessary box colliders from the target GameObject - Click "Assign Self" to force self assigning (The script normally does it automatically upon enabling)