Quickstart
Getting Started with Enemy Masses
Welcome to Enemy Masses! This guide will help you set up the asset and get your first massive crowd running in minutes. Please note: Enemy Masses is still under development. Please contact me if you are looking for a specific feature and I will try my best to implement it.
Prerequisites
Before you begin, ensure you have the following installed in your project:
Unity 6 LTS or higher.
GPU Instancer Pro (Required for rendering).
GPU Instancer Pro - Crowd Animator Addon
Game Creator 2 (Optional - See Integration Folder).
1. Initial Setup
After importing the Enemy Masses package into your project, the first thing you should do is run the Setup Wizard. This tool is designed to configure your project settings and help you create your first enemy faction without manual setup.
Opening the Setup Wizard
To open the wizard manually:
Go to the top menu bar.
Select Tools > Enemy Masses > Setup Wizard.

2. Using the Setup Wizard
The Setup Wizard will guide you through the following steps:
Welcome & Overview: A brief introduction to the core concepts of Enemy Masses.
Crowd Type: Choose between different crowd behaviors (e.g., Aggressive, Passive).
Animator Workflow: Configure how animations are handled for optimal performance.
Faction Creation: Define your first enemy faction (e.g., "Orcs", "Zombies").
Combat & RTS Setup: Configure combat styles and RTS-like controls if needed.
Prefab Assignment: Assign your enemy prefab models.
Scene Setup: Automatically adds necessary managers to your current scene.
3. Critical Step: Patching GPU Instancer Pro
This is a highly recommended step.
Enemy Masses includes a patching system for GPU Instancer Pro to fix known issues and improve compatibility, especially with Unity 6.
Why Patch?
The patch addresses several critical bugs in the original GPU Instancer Pro package:
Fixes Invisible Agents: Resolves issues where agents would spawn but remain invisible.
Fixes Index Errors: Prevents
ArgumentOutOfRangeExceptionandIndexOutOfRangeExceptionduring rapid spawn/despawn cycles.Unity 6 Compatibility: Fixes UI Toolkit threading errors related to
[HelpURL]attributes in the Inspector.
How to Patch
The Setup Wizard will prompt you to apply these patches. We strongly recommend clicking "Apply Patches" when asked.

If you need to apply them manually later:
Go to Tools > Enemy Masses > Debug > Patch GPU Instancer Pro.
Follow the on-screen prompts.
Note: These patches modify the source files of the GPU Instancer Pro package in your
Packagesfolder. If you update GPU Instancer Pro, you may need to re-apply these patches.
5. Manual Scene Setup (Advanced)
If you prefer to set up your scene manually or need to integrate Enemy Masses into an existing scene without the wizard, follow these steps.
Core Components (Required for All Types)
Every scene using Enemy Masses requires two main components:
EnemyMassesCrowdController:
Create a new GameObject named
EnemyMassesCrowdController.Add the
EnemyMassesCrowdControllercomponent.Important: Enable the
Register Immediatelycheckbox.Assign your
EnemyCrowdScriptableObjects to theEnemy Crowdslist.
GPUIPrefabManager (from GPU Instancer Pro):
Create a new GameObject named
GPUIPrefabManager(or use the one from GPUI menu).Add the
GPUIPrefabManagercomponent.Enable
Find Instances At InitializationandRegister Immediately.Crucial: Assign a
GPUIPrefabProfile(create one if needed) and add your enemy prefabs to thePrototype Settingslist.Link this manager to the
Prefab Managerfield on yourEnemyMassesCrowdController.
Setup for Combat Crowds (Action/RPG)
For standard 3rd-person or action games where enemies attack the player:
Select your
EnemyMassesCrowdController.Assign your Player's Transform to the
Player Targetfield.Ensure your
EnemyCrowdassets haveEnable Combat Systemchecked.
Setup for RTS / Battle Simulation
For Top-Down strategy games or large scale battle simulations:
Controller Settings:
On
EnemyMassesCrowdController, enableFaction Battle Mode.Add the
EnemyMassesRTSControllercomponent to the same GameObject.Add the
EnemyMassesProjectileSystemcomponent (handles arrows/magic).
Camera Setup:
Select your Main Camera.
Add the
GPUICameracomponent (required for rendering).Add the
RTSCameraControllercomponent for movement controls.
Optional Systems:
Fog of War: Create a GameObject with the
FogOfWarLitecomponent.Minimap: Requires a dedicated Camera and
RTSMinimapController.
Setup for Civil Crowds
For ambient NPCs and city crowds:
Controller Settings:
Ensure your
EnemyCrowdasset hasCivil Modeenabled andCombat Systemdisabled.
Navigation:
Add
CivilWaypointorCivilZoneobjects to your scene to define where crowds can walk.The
EnemyMassesCrowdControllerwill automatically detect these if configured in the Crowd asset.
6. Next Steps
Once the wizard is complete:
Open the Demo Scenes to see the system in action.
Select the EnemyMassesCrowdController in your scene to tweak spawn rates and limits.
Review the
EnemyCrowdScriptableObject created by the wizard to further customize your unit's stats and behavior.
Enjoy creating massive battles!
Last updated