Getting Started

Getting Started

🧠 How It Works

The Modular Weapon System allows you to create fully customizable weapons by assembling modular components. You can configure:

  • Weapon: The core controller that handles firing input and state.
  • Barrel: Defines the shooting behavior (raycast, projectile, shotgun, laser…).
  • Magazine: Controls ammo logic (bullet-based, rechargeable…).
  • Recoil: Adds recoil feedback with customizable spray patterns.
  • Damage System: Supports hitboxes, health, and explosion damage.

You simply create a prefab of your 3D model, assign the relevant scripts, customise it, and you’re good to go.

Note

Everything is extensible , so you can make more shooting behaviors if you need to

📦 What’s Included

  • ✅ 5 fully functional demo weapons (Pistol, Shotgun, Grenade Rifle, Rocket Launcher, Laser Gun)
  • ✅ Configurable Weapon components: Weapon, Barrels, Magazines, Recoil
  • ✅ Health & damage support: Health, DamageData, Hitboxes
  • ✅ Example scenes with prefabs, animations, VFX, and SFX
  • ✅ Support for standard, URP and HDRP
  • ✅ Easy-to-extend C# codebase

⚙️ Installation

  1. Import the Core Package
    Drag the main .unitypackage into your Unity project or import it from the Asset Store.

  2. Set Up SRP Support (URP or HDRP)

    • Navigate to Assets/ModularWeaponSystem/SRPSupport/
    • Double-click either URP_Support.unitypackage or HDRP_Support.unitypackage
      ℹ️
      This automatically updates materials for your render pipeline.
  3. Set Up Layers (Recommended)

    • Configure Unity Layers for:
      • Bullets / Projectiles
      • Damageable Targets
      • Raycast filtering (for lasers or hit detection)
  4. Explore the Demo Scene

    • Open Assets/ModularWeaponSystem/Examples/Blueprint.unity to see everything in action.
  5. Create Your Own Weapon

    • Use the sample prefabs or build from scratch with Weapon, Barrel, Magazine, and other modules.