Skip to content

About

Confederate AI: logic-based 3D AI for Unity. Allied and enemy agents on the NavMesh with patrols, waypoint paths, melee combat, companions, spawners, ragdoll deaths and editor tools.

Topics

Resources

Stars

36 stars

Watchers

1 watching

Forks

Repository files navigation

Twitter: @NorowaretaGemu



Unity
C# JSON HLSL ShaderLab

ConfederateAI

Logic-based 3D AI for Unity

Confederate AI logo

Allies and enemies that patrol, spot each other, fight, follow you and die in a heap. Plain C# on Unity's NavMesh, no plug-ins.

Website: https://cursedprograms.github.io/ConfederateAI/ · itch.io: https://cursed-entertainment.itch.io/confederate-ai

Confederate AI agents and editor windows in Unity

Features

  • Two factions: allies and enemies find each other within their sight distance, go for the nearest target and attack; enemies go after the player too.
  • Movement: random wandering, set waypoints, or a path of linked waypoints (with branches), all on the NavMesh, walking or running.
  • Melee combat: health, stamina and regeneration, damage, levels (up to a maximum level), attack animations and blood.
  • Deaths: ragdoll or animated.
  • Companions: walk up to an ally and press Action to have them follow you; Reset sends them back.
  • Spawners: spawn agents (or followers), optionally respawning them.
  • Editor tools: Character Editor, Character Debugger, Waypoint Manager, AI Creator (characters, spawners, the controller) and Character Cleaner (removes the AI again).

The Confederate AI editor windows

Before you start

  • Use URP (Universal Render Pipeline) and the new Input System.
  • Have a blood pool and a blood spatter particle system.
  • Create the UI elements in world space and make them children of their AI (the player's can sit on the camera).
  • Double-check every field that needs a GameObject.

The project is a Unity 2022.3 project; open the folder in Unity Hub.

Setup

1. GameController

  • Tag: "GameController"
  • Attach: AIControllerCore.cs
  • Create 2 children (one per faction):
    • Attach: FauxTarget.cs
    • Set Faction: 0 (Ally), 1 (Enemy)

2. AI agent

  • Attach: AICore.cs
  • Create a child object:
    • Attach: AIFollowControl.cs
  • Create a ragdoll

3. Player (Character Controller)

  • Tag: "Player"
  • Attach: PlayerCore.cs

4. Spawner

  • Attach: AISpawner.cs

Used in


© Cursed Entertainment 2026

About

Confederate AI: logic-based 3D AI for Unity. Allied and enemy agents on the NavMesh with patrols, waypoint paths, melee combat, companions, spawners, ragdoll deaths and editor tools.

Topics

Resources

Stars

36 stars

Watchers

1 watching

Forks

Releases

Sponsor this project

Packages

Used by

Contributors

Languages