Talk to me about this code error when trying to build vs studio file for ue 5.6.1 project: Running C:/Program Files/Epic Games/UE_5.6/Engine/Build/BatchFiles/Build.bat -projectfiles -project=”C:/Users/Sarah/Documents/Unreal Projects/Dreamer1/Dreamer1.uproject” -game -rocket -progress -log=”C:UsersSarahDocumentsUnreal ProjectsDreamer1/Saved/Logs/UnrealVersionSelector-2025.08.25-21.22.28.log”
Using bundled DotNet SDK version: 8.0.300 win-x64
Running UnrealBuildTool: dotnet “….EngineBinariesDotNETUnrealBuildToolUnrealBuildTool.dll” -projectfiles -project=”C:/Users/Sarah/Documents/Unreal Projects/Dreamer1/Dreamer1.uproject” -game -rocket -progress -log=”C:UsersSarahDocumentsUnreal ProjectsDreamer1/Saved/Logs/UnrealVersionSelector-2025.08.25-21.22.28.log”
Log file: C:UsersSarahDocumentsUnreal ProjectsDreamer1SavedLogsUnrealVersionSelector-2025.08.25-21.22.28.log
Generating VisualStudio project files:
Discovering modules, targets and source code for project…
Adding projects for all targets…
C:UsersSarahDocumentsUnreal ProjectsDreamer1PluginsInEditorCppSourceInEditorCppInEditorCpp.build.cs(7,27): error CS0117: ‘ModuleRules.ModuleType’ does not contain a definition for ‘UncookedOnly’
Adding projects for all targets took 1.53s
Expecting to find a type to be declared in a target rules named ‘Dreamer1Target’. This type must derive from the ‘TargetRules’ type defined by UnrealBuildTool.
Result: Failed (RulesError)
Total execution time: 2.33 seconds
Successfully created text document ‘Ue 5.6′ which will be referenced in all future messages with the unique identifier textdoc_id: ’68ad0d18a9588191b9425457f1620857′
Gotcha—two separate issues in that log. Here’s the plan:
1) Fix the plugin’s `.Build.cs`
– Remove `Type = ModuleRules.ModuleType.UncookedOnly;` (wrong enum in the wrong place).
– Keep deps clean and guard editor-only deps with `Target.bBuildEditor`.
– Put the “when/where this module loads” in the **.uplugin** (`Modules[].Type = “Editor”` or `”UncookedOnly”`), not in `.Build.cs`. citeturn7search4turn7search8turn4search3
2) Restore/create proper target rules for your project
– Add `Source/Dreamer1.Target.cs` (Game) and `Source/Dreamer1Editor.Target.cs` (Editor).
– Ensure class names match file names and derive from `TargetRules`.
– Set `IncludeOrderVersion = EngineIncludeOrderVersion.Latest;` to quiet upgrade warnings. citeturn6search8
3) Regenerate + clean
– Close UE/VS → delete `Binaries/`, `Intermediate/`, `.vs/` (project + plugin) → **Generate Visual Studio project files** → build Development Editor.
I dropped ready-to-paste files/snippets (fixed `.Build.cs`, `.uplugin` excerpt, both Target files, and a minimal game module stub if you were BP-only) into the canvas titled **“UE 5.6.1 – Fixes for InEditorCpp + Dreamer1 targets”**. Apply those and re-generate.
Why your specific errors happened (quickly):
– `CS0117 … ModuleRules.ModuleType.UncookedOnly`: `UncookedOnly` is a **host/type** used in plugin descriptors (`.uplugin` → `Modules[].Type` via `EHostType::Type`), not the C# `ModuleRules.ModuleType`. Hence no such member. Move it to the plugin descriptor. citeturn4search3
– “Expecting to find a type … named `Dreamer1Target`”: UBT couldn’t find a `Dreamer1Target : TargetRules` class—usually missing/renamed `Source/Dreamer1.Target.cs` (or mismatch with the project name). Recreate with the standard boilerplate. citeturn6search8
If anything still fails, paste the first 50 lines of:
– `Plugins/InEditorCpp/Source/InEditorCpp/InEditorCpp.Build.cs`
– `Plugins/InEditorCpp/InEditorCpp.uplugin`
– `Source/Dreamer1.Target.cs` and `Dreamer1Editor.Target.cs`
and I’ll spot-check.
**a.** Want me to tailor the `.uplugin` to `”Editor”` vs `”UncookedOnly”` based on how you use the plugin?
**b.** Do you want a quick script to auto-clean and regenerate (PowerShell `.ps1`) for this project?
Write out a step by step plan of action for my engineer to follow. High level Claude Sonnet 3.5
Successfully updated text document with textdoc_id ’68ad0d18a9588191b9425457f1620857’
I added a concise, high-level, step-by-step action plan to the canvas for your engineer (top section). It’s tool-agnostic, ordered, and references the exact artifacts to touch.
**a.** Want me to also drop in a `Clean-Regen.ps1` script your engineer can run locally?
**b.** Should I convert the plan into a printable 1-page checklist (with owner/due columns)?