A downloadable tool

Download NowName your own price

AutoColliderGenerator for Unity

Automatically generates simple colliders (Box, Sphere, or Capsule) for a 3D model's children based on mesh bounds.

Features

  • Adds BoxCollider, SphereCollider, or CapsuleCollider depending on mesh shape.
  • Skips GameObjects that already have colliders.
  • Tags generated colliders to allow easy removal.
  • Editor buttons to:
    • Generate colliders.
    • Remove generated colliders.
    • Toggle preview of potential colliders in the Scene view (Gizmos).
  • Clean and recursive handling of nested objects.

How to Use

  1. Attach the AutoColliderGenerator script to the root of your model or GameObject hierarchy.
  2. In the Inspector, use the following buttons:
    • Generate Colliders: Adds appropriate colliders to children without affecting existing ones.
    • Remove Generated Colliders: Removes only the colliders generated by this script.
    • Preview Colliders: Toggle to visualize potential colliders using Gizmos.
  3. Customize logic inside AutoColliderGenerator.cs if needed.

Folder Structure

Assets/
└── AutoColliders/
    ├── AutoColliderGenerator.cs
    ├── AutoColliderGeneratorEditor.cs
    └── GeneratedColliderMarker.cs

Notes

  • Capsule detection is based on size ratio (e.g., one dimension significantly larger).
  • Sphere detection assumes roughly equal dimensions.
  • Previews are drawn using the Gizmos API when the GameObject is selected.
  • This is made for fun and without any AI.

Credits & Special Thanks

Special thanks to Silly (yuikonnu442) for the demonstration image.

Happy coding !! Give a tip for support :)

Published 13 hours ago
StatusReleased
CategoryTool
AuthorLluciocc
Tags3D, Indie, No AI, Physics, Royalty Free, Simple, Unity

Download

Download NowName your own price

Click download now to get access to the following files:

AutoCollidersUnity.unitypackage 3.4 kB

Leave a comment

Log in with itch.io to leave a comment.