UE5 Lyra AI Setup Explained | Spawn & Possess Bots with Gameplay Ability System (GAS) | EP 82

Опубликовано: 06 Сентябрь 2026
на канале: Unreal Shinobi
409
12

In this Unreal Engine 5 tutorial, we implement AI Bots with the same Gameplay Ability System (GAS) setup as the player, inspired by the Lyra Starter Game architecture.

One of the biggest challenges in GAS is making AI and Players share the same system, and in this episode we solve that by properly handling:

• AI Pawn spawning
• AI Controller possession
• Ability System Component (ASC) initialization
• PlayerState vs AI setup differences
• Sharing GAS logic between Player & AI

By the end of this video, your AI bots will be able to use the exact same abilities, attributes, and gameplay logic as players — just like Lyra.

🔥 What you will learn

• How Lyra structures Player vs AI GAS setup
• Spawning AI Pawns correctly
• Possessing AI with AIController
• Initializing GAS for AI (without breaking replication)
• Reusing Player GAS setup for bots
• Avoiding common GAS mistakes with AI

This is part of a deep dive series into Unreal Engine 5 Gameplay Ability System (GAS) where we break down Lyra’s production-level architecture step by step.

If you're building:

✔ Multiplayer games
✔ AI combat systems
✔ Ability-driven gameplay
✔ Scalable GAS architecture

This series will help you build it the right way.

🔔Assets used in series are available for FREE on Discord🔔
🚀 Discord -   / discord  

If you want to support me
🌳Patreon   / unrealshinobi  
🌳Ko-Fi https://ko-fi.com/unrealshinobi

📌 Missed the Previous Episode? Watch the Full Playlist Here:

👉 Master Unreal Series -    • How to make your first game in Unreal engi...  

👉 Master Level Design Series -    • Master Level Design with Blender & Unreal  

⏱️ Chapter Breakdown - Will be uploaded soon
0:00 Introduction – AI Bots with Player GAS Setup (UE5 Lyra)
1:11 How GameMode Spawns Player Characters in Unreal Engine
1:40 Common Problems with AI Controllers in UE5
2:35 Enabling PlayerState for AI Controllers (Required for GAS)
3:00 Correct Spawn Order for AI Controller & Pawn
3:20 Creating a Custom Function to Spawn AI Bots
9:30 Spawning AI Controller Programmatically
10:50 Creating PlayerState for AI Pawn (GAS Setup)
11:25 Why Use RestartPlayerAtTransform for AI Spawning
12:50 Injecting Pawn Data into PlayerState Before Spawn
15:30 Advancing Pawn Extension Lifecycle State
16:16 Spawning AI Pawn into the World
19:50 Debugging: Why GAS is Not Working for AI Pawn
20:50 What Happens When You Restart a Player Pawn
21:55 Handling Possess & UnPossess Events Properly
26:20 Two Key Principles for Modular GAS Architecture
27:00 Manual vs Built-in PlayerState Linking in Unreal Engine
28:55 Understanding Local Roles (Authority vs Autonomous vs Simulated)
30:15 Why We Skip ROLE_SimulatedProxy in This Setup
31:44 Final Result – GAS Fully Working on AI Pawn
32:20 Applying Gameplay Effects to AI Characters
32:35 Cleaning Up Old/Unused Code
33:00 Using a Single Default Character Class for All Actors
34:15 Exercise – Build a Character Lobby System in UE5