Enemy AI for Photon Fusion 2 — Networked FSM
Ragdoll on death, simulated on each peer so it costs no bandwidth. ... FIVE ARCHETYPES, READY TO DROP IN ... The same ability runs unchanged in single-player and multiplayer. REQUIREMENTS
by 2 Dude Studios
Price History +
• Unity 6000.0 LTS+ (tested on 6000.0.84 and 6000.3.19)
• Render pipeline: AI works with any pipeline; demo content is URP
• Networking: Photon Fusion 2 (host/server mode) + Fusion FSM addon, not included (free from Photon)
• Assemblies: EnemyAI.Core (no dependencies), EnemyAI.Standalone, EnemyAI.Fusion (enables itself when Fusion is detected), editor and sample assemblies
• Pathfinding: Unity NavMeshAgent; AI Navigation package optional (used by the demo-scene NavMesh bake)
• Full C# source; 8 sample scenes (Melee, Shooter, Waves, Boss × standalone and Fusion)
• Docs: in-package Markdown + online site
• Demo art: Quaternius Universal Animation Library and Mesh2Motion animations, CC0
Enemy AI that works in multiplayer, and keeps working when you turn multiplayer off.
Most enemy-AI assets leave networking to you. This one is built on Photon Fusion 2 host mode from the ground up: the host simulates, clients render replicated state, and enemy behaviour stays authoritative and consistent for everyone in the session. Enemy authority comes from Fusion itself, so it works with your own launcher and player setup. The included bootstrapper is a demo, not a requirement.
The same enemies also run completely standalone: same configuration, same archetypes, no networking in the scene, and no third-party packages.
ENEMIES THAT BEHAVE LIKE ENEMIES
• Gradual detection. Awareness builds while you're visible and fades when you break line of sight. It crosses one threshold to investigate and another to commit. It isn't a simple line-of-sight on/off check.
• Hearing. Footstep noise, muffled by walls, raises suspicion and sends enemies to investigate.
• Melee and ranged combat. Chase and strike, or hold a firing distance, kite, and fall back to cover when you close in.
• They call for help. Spotting you, or dying, raises the alertness of nearby allies.
• They retreat. Flee on low health, when outnumbered, or when an ally goes down. Each trigger toggles per enemy.
• Recovery. Passive regeneration, faster healing in regeneration zones, and an optional per-enemy switch to heal to full between fights.
• Ragdoll on death, simulated on each peer so it costs no bandwidth.
• Swap behaviour at runtime: change how an enemy chases, attacks or flees while it's alive.
FIVE ARCHETYPES, READY TO DROP IN
Melee, Stealth, Shooter, Waves and Boss, each a preset in the Enemy Configurator, with playable sample scenes in both runtimes. Includes a wave system with per-wave enemy composition and automatic progression, plus health-threshold boss phases that swap the boss's abilities as you wear it down.
TOOLING THAT RESPECTS YOUR TIME
• Enemy Configurator: pick an archetype, tune it, and get the ScriptableObjects plus a ready-to-use prefab in one click.
• Scene Doctor: checks your scene for mistakes that fail silently (no NavMesh, no target, wrong layers, missing cover), each finding with a jump-to-culprit button.
• Setup window: checks the layers, tags and settings the AI needs, and fixes them at a button press.
• Demo Scene builder: a playable test scene around any enemy prefab, NavMesh baked.
• Range and field-of-view gizmos, plus inspectors with play-mode wave and boss controls.
CONFIGURED WITH DATA, EXTENDED WITH CODE
Ranges, speeds, thresholds and behaviour switches live in ScriptableObjects, with cross-field checks that catch broken setups before you press Play. For your own behaviour, implement the IAbility interface (simulation hooks for logic, render hooks for visuals) and swap it in at runtime. You don't edit any package files, so upgrades stay clean. The same ability runs unchanged in single-player and multiplayer.
REQUIREMENTS
• Unity 6000.0 LTS or newer (tested on 6000.0 and 6000.3), with the uGUI package (included in every Unity 6 template).
• Single-player: no third-party packages.
• Multiplayer: Photon Fusion 2 and the Fusion FSM addon, two free downloads from Photon, plus your own Photon App ID. The package detects them and switches on the networked runtime automatically.
• Fusion host (or server) mode. Shared mode is not supported.
• Demo scenes: URP, Unity's Input System, and (Fusion demos only) Photon's free SimpleKCC addon.
• Bring your own player controller and character art. This package is the AI; sample players and a demo character are included to get you running.
Documentation: quick start, required project setup, Fusion integration, per-archetype notes and an extension guide ship in the package and online:
https://2-dude-studios.github.io/Enemy-AI-Photon-Fusion-Docs/
for any query: support@2dudestudios.com
Demo character and animations: Quaternius and Mesh2Motion, both CC0.