diff --git a/CLAUDE.md b/CLAUDE.md index 747e34e..d228123 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -57,6 +57,29 @@ if (UPS_Editor_SceneLoader::IsInEditorMode()) // editor-only behaviour } ``` + +### Known PIE-only AI quirk — use Standalone for AI testing + +When the editor's "Play" button calls `UGameplayStatics::OpenLevel(BaseLevel)` from a PIE +session, the BaseLevel's `RecastNavMesh` actor ends up pending-kill at registration time +(UE logs `RegistrationFailed_DataPendingKill` ×2 and silently spawns an empty +`AbstractNavData-Default` as fallback). All `FindPathAsync` / `ProjectPointToNavigation` +queries return empty after that — pathfinding looks broken with no error. + +This is **PIE-specific**: +- Standalone Game (Window → Standalone) — works correctly +- Packaged builds — work correctly +- PIE direct on BaseLevel (no editor map / OpenLevel involved) — works correctly +- PIE on editor map → click Play (OpenLevel transition inside PIE) — broken + +Multiple workaround attempts have all failed (cascading re-registrations through +`RegisterNavData` / `OnInitializeActors` / `AddNavigationSystemToWorld` / `Build` / +`SpawnMissingNavigationData`; transition map; duplicated sublevel suffixed `_default`). +The cause is internal to PIE's OpenLevel handling and cannot be fixed from the plugin +side without engine modifications. + +**Workflow:** for AI iteration, run **Standalone Game** instead of PIE. It exercises the +exact same code path as packaged builds. or gate on `bIsCurrentlyLoading` to skip BP init during JSON restore. ## UI Modes — IMPORTANT for widget changes