Open Unreal Editor with auto-detection of custom engine builds
Role: Editor Launch Utility Scope: Current Working Directory (dynamic) Engine Version: Auto-detected from *.uproject Platform: Windows
Automatically launch Unreal Editor with the correct custom engine build. The skill manages engine path caching and supports project file regeneration. All paths are dynamically resolved from the current working directory.
The skill uses the current working directory to find all paths:
{CWD} = Current Working Directory (from environment)
{ProjectFile} = First *.uproject file found in {CWD}
{ProjectName} = Name extracted from {ProjectFile} (without .uproject extension)
{CacheFile} = {CWD}/Saved/claude-data.txt
First, find the .uproject file in the current working directory:
# Find .uproject file in current directory
dir /b *.uproject
This returns the project file name (e.g., S2.uproject). Use this for all subsequent operations.
Check if the engine path is cached in ./Saved/claude-data.txt:
Read file: {CWD}/Saved/claude-data.txt
Expected format:
[UnrealEngine]
EnginePath={engine.path}
EngineAssociation=5.7.1-huli
LastOpened=2025-12-14T12:00:00
[ProjectInfo]
ProjectName=S2
ProjectPath={CWD}/{ProjectFile}
If claude-data.txt doesn't exist or is invalid, query the Windows Registry:
reg query "HKEY_CURRENT_USER\SOFTWARE\Epic Games\Unreal Engine\Builds"
Then read the project file to get the EngineAssociation:
Read file: {CWD}/{ProjectFile}
Extract EngineAssociation field (e.g., 5.7.1-huli) and match it with registry entries.
Save the engine path to ./Saved/claude-data.txt:
# Ensure Saved directory exists
mkdir "{CWD}\Saved" 2>nul
Use Write tool to create/update {CWD}/Saved/claude-data.txt with the detected path.
Launch Unreal Editor using the detected path:
start "" "{EnginePath}/Engine/Binaries/Win64/UnrealEditor.exe" "{CWD}\{ProjectFile}"
If user requests or if project files are stale, regenerate:
"{EnginePath}/Engine/Binaries/DotNET/UnrealBuildTool/UnrealBuildTool.exe" -projectfiles -project="{CWD}\{ProjectFile}" -game -engine -progress
Or use the batch file if available:
"{EnginePath}/GenerateProjectFiles.bat" "{CWD}\{ProjectFile}"
Action: Find .uproject in current directory
Command: dir /b *.uproject (or use Glob tool with pattern "*.uproject")
Result: Store as {ProjectFile} variable
Action: Read {CWD}/Saved/claude-data.txt
- If exists and valid: Extract EnginePath, proceed to Step 5
- If missing or invalid: Proceed to Step 3
Action: Query registry and read {ProjectFile}
Commands:
1. reg query "HKEY_CURRENT_USER\SOFTWARE\Epic Games\Unreal Engine\Builds"
2. Read {CWD}/{ProjectFile}
3. Match EngineAssociation with registry entry
4. Save result to claude-data.txt
Action: Write to {CWD}/Saved/claude-data.txt
Format:
[UnrealEngine]
EnginePath={detected_path}
EngineAssociation={from_uproject}
LastOpened={current_timestamp}
[ProjectInfo]
ProjectName={ProjectName}
ProjectPath={CWD}/{ProjectFile}
Action: Execute launch command
Command: start "" "{EnginePath}/Engine/Binaries/Win64/UnrealEditor.exe" "{CWD}\{ProjectFile}"
Ask user: "Do you want to regenerate project files?"
Options:
- Yes, regenerate Visual Studio/Rider project files
- No, just open the editor
- Regenerate and open editor
When user invokes open-editor without options:
When user asks to regenerate:
When user suspects wrong engine or cache is stale:
If no .uproject file in current directory:
Error: No .uproject file found in current directory
Solution:
1. Verify you are in the correct project directory
2. Current directory: {CWD}
3. Expected: A directory containing *.uproject file
If registry query fails or EngineAssociation not matched:
Error: Could not find Unreal Engine build for association '{EngineAssociation}'
Solution:
1. Verify {ProjectFile} EngineAssociation value
2. Check if custom engine is registered in Epic Games Launcher
3. Manually register engine:
- Open Epic Games Launcher
- Settings > Installed Engine Versions
- Add custom engine path
If start command fails:
Error: Failed to launch Unreal Editor
Checks:
1. Verify engine path exists: {EnginePath}/Engine/Binaries/Win64/UnrealEditor.exe
2. Verify project file exists: {CWD}/{ProjectFile}
3. Check for crash logs in: {CWD}/Saved/Crashes
If .uproject is corrupted:
Action: Offer to regenerate from template
Warning: This will reset plugin configuration
User: open editor
Assistant:
1. Detecting project file... Found: S2.uproject
2. Reading cached engine path from ./Saved/claude-data.txt...
3. Found: EnginePath={engine.path} (5.7.1-huli)
4. Launching Unreal Editor...
5. Done! Editor is starting.
User: open editor
Assistant:
1. Detecting project file... Found: S2.uproject
2. Cache not found, detecting engine...
3. Reading S2.uproject... EngineAssociation: 5.7.1-huli
4. Querying registry... Found: {engine.path}
5. Saving cache to claude-data.txt...
6. Launching Unreal Editor...
7. Done! Editor is starting.
User: open editor and regenerate project files
Assistant:
1. Detecting project file... Found: S2.uproject
2. Reading cached engine path... Found: {engine.path}
3. Regenerating project files...
4. Running UnrealBuildTool -projectfiles...
5. Project files regenerated successfully!
6. Launching Unreal Editor...
7. Done! Editor is starting.
Location: {CWD}/Saved/claude-data.txt
Format (INI-style):
[UnrealEngine]
EnginePath={engine.path}
EngineAssociation=5.7.1-huli
LastOpened=2025-12-14T10:30:00
[EditorSettings]
LastMap=/Game/Maps/DevMap
WindowMode=Windowed
[ProjectInfo]
ProjectName=S2
ProjectPath={CWD}/S2.uproject
dir /b *.uproject
start "" "{EnginePath}/Engine/Binaries/Win64/UnrealEditor.exe" "{CWD}\{ProjectFile}"
"{EnginePath}/Engine/Binaries/DotNET/UnrealBuildTool/UnrealBuildTool.exe" -projectfiles -project="{CWD}\{ProjectFile}" -game -engine -progress
reg query "HKEY_CURRENT_USER\SOFTWARE\Epic Games\Unreal Engine\Builds"
if exist "{EnginePath}/Engine/Binaries/Win64/UnrealEditor.exe" (echo Editor found) else (echo Editor NOT found)
start command and registry queries)start "" syntax prevents blocking the terminal