meatballfarm-Amogus icon

Amogus

Amogus

Last updated a day ago
Total downloads 55
Total rating 0 
Categories Valuables
Dependency string meatballfarm-Amogus-1.0.0
Dependants 0 other packages depend on this package

This mod requires the following mods to function

Zehs-REPOLib-3.0.2 icon
Zehs-REPOLib

Library for adding content to R.E.P.O.

Preferred version: 3.0.2

README

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/ <br>
└── AutoColliders/ <br>
├── AutoColliderGenerator.cs <br>
├── AutoColliderGeneratorEditor.cs <br>
└── GeneratedColliderMarker.cs

Installation

  1. Copy the AutoColliders folder into your Unity project's Assets/ directory.
  2. Or import the .unitypackage version via Assets > Import Package > Custom Package.

License

MIT License — free to use and modify, with attribution.

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.

Images

Credits & Special Thanks

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