From b551b1c77f44d622f31f192436fa5a95c272f2d4 Mon Sep 17 00:00:00 2001 From: Jin Hyung Ahn Date: Thu, 18 Jun 2026 21:26:54 +0900 Subject: [PATCH 1/3] fix(cpp): UE 5.8 compatibility for FJsonObject::Values key type (#55) UE 5.8 changed FJsonObject::Values key from FString to UE::FSharedString. Iterating ->Values and using Pair.Key as an FString broke compilation (C2440/C2664). operator* yields const TCHAR* on both FString (5.7) and UE::FSharedString (5.8), so dereference the key at the two break sites: - MCPythonTcpServer.cpp: FString KeyString = *Pair.Key; - MCPythonHelper.cpp: FindPinByName(NewNode, FString(*Pair.Key), ...) A third site (MCPythonHelper_BehaviorTree.cpp) already used *Pair.Key. Verified: BuildPlugin succeeds on UE 5.8; change is source-compatible with 5.7 (standard FString API). --- .../Source/UnrealMCPython/Private/MCPythonHelper.cpp | 3 ++- .../Source/UnrealMCPython/Private/MCPythonTcpServer.cpp | 4 +++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/Plugins/UnrealMCPython/Source/UnrealMCPython/Private/MCPythonHelper.cpp b/Plugins/UnrealMCPython/Source/UnrealMCPython/Private/MCPythonHelper.cpp index 3b29cc1..faccbd4 100644 --- a/Plugins/UnrealMCPython/Source/UnrealMCPython/Private/MCPythonHelper.cpp +++ b/Plugins/UnrealMCPython/Source/UnrealMCPython/Private/MCPythonHelper.cpp @@ -660,7 +660,8 @@ static UEdGraphNode* CreateBPNodeFromJson(UEdGraph* Graph, UBlueprint* Blueprint const TSharedPtr& PinDefaults = NodeJson->GetObjectField(TEXT("pin_defaults")); for (auto& Pair : PinDefaults->Values) { - UEdGraphPin* Pin = FindPinByName(NewNode, Pair.Key, EGPD_Input); + // *Pair.Key yields const TCHAR* on both UE 5.7 (FString key) and 5.8 (UE::FSharedString key). + UEdGraphPin* Pin = FindPinByName(NewNode, FString(*Pair.Key), EGPD_Input); if (Pin) { FString Value; diff --git a/Plugins/UnrealMCPython/Source/UnrealMCPython/Private/MCPythonTcpServer.cpp b/Plugins/UnrealMCPython/Source/UnrealMCPython/Private/MCPythonTcpServer.cpp index c3eb060..631858d 100644 --- a/Plugins/UnrealMCPython/Source/UnrealMCPython/Private/MCPythonTcpServer.cpp +++ b/Plugins/UnrealMCPython/Source/UnrealMCPython/Private/MCPythonTcpServer.cpp @@ -147,7 +147,9 @@ FString ConvertJsonValueToPythonLiteral(const TSharedPtr& JsonVal) for (const auto& Pair : Object->Values) { if (!bFirst) DictLiteral += TEXT(", "); - FString KeyString = Pair.Key; + // UE 5.7: FJsonObject::Values key is FString; UE 5.8: UE::FSharedString. + // operator* yields const TCHAR* on both, so this builds on either engine. + FString KeyString = *Pair.Key; // Escape key string as well (similar to EJson::String case) KeyString = KeyString.Replace(TEXT("\\"), TEXT("\\\\")); KeyString = KeyString.Replace(TEXT("\'"), TEXT("\\\'")); From 8a4a8ab736d5ebe03ef910d91aedebd249fb2df8 Mon Sep 17 00:00:00 2001 From: Jin Hyung Ahn Date: Fri, 19 Jun 2026 11:49:03 +0900 Subject: [PATCH 2/3] fix(plugin): drop hardcoded EngineVersion so the plugin loads on 5.7 and 5.8 (#56) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The source .uplugin pinned "EngineVersion": "5.7.0". Under UE 5.8 this triggers an "incompatible plugin / load anyway?" prompt: - interactive editor: a modal blocks startup waiting for input; - -unattended: the prompt auto-answers "No" and the plugin is SKIPPED entirely (no TCP server, no actions) — so the plugin silently does not load on 5.8 from source. Removing the field skips the version-compatibility check, so the plugin loads cleanly on whatever engine opens it (verified 5.7 and 5.8). This only affects source / source-zip usage: RunUAT BuildPlugin -Rocket stamps the building engine's EngineVersion into each precompiled binary zip's .uplugin, so per-version binary distribution is unchanged. Verified on a live UE 5.8 editor (dev): plugin mounts, DLL loads, TCP server starts on :12029, E2E 254/254 pass, in-editor suite 280 pass / 0 errors (the lone failure root-caused to a stale asset left by an earlier crashed run, not a 5.8 regression). --- Plugins/UnrealMCPython/UnrealMCPython.uplugin | 1 - 1 file changed, 1 deletion(-) diff --git a/Plugins/UnrealMCPython/UnrealMCPython.uplugin b/Plugins/UnrealMCPython/UnrealMCPython.uplugin index 85af59a..4f09121 100644 --- a/Plugins/UnrealMCPython/UnrealMCPython.uplugin +++ b/Plugins/UnrealMCPython/UnrealMCPython.uplugin @@ -11,7 +11,6 @@ "MarketplaceURL": "", "FabURL": "com.epicgames.launcher://ue/Fab/product/5cd0eb75-3c66-43bf-88ac-693be184fb95", "SupportURL": "", - "EngineVersion": "5.7.0", "CanContainContent": true, "IsBetaVersion": false, "Installed": true, From 9dda1d066554d4e17cd9f595265a033eed0fad46 Mon Sep 17 00:00:00 2001 From: Jin Hyung Ahn Date: Sat, 20 Jun 2026 09:46:32 +0900 Subject: [PATCH 3/3] docs(install): make precompiled-vs-source choice explicit; add load-error troubleshooting (#57) Users have been downloading the source-only zip, which makes Unreal try to compile the C++ module (needs Visual Studio) and fails with "designed for build 5.7.0 / rebuild fails / editor closes". Emphasize that most users want the precompiled `__` zip matching their exact engine version, and add a WARNING that maps that exact symptom to "you grabbed the wrong asset." --- README.md | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 6a5c2ad..8bdd764 100644 --- a/README.md +++ b/README.md @@ -117,10 +117,10 @@ expose, an optional C++ helper (`MCPythonHelper`) is available. Full details in **Option A: Download from GitHub Releases (Recommended)** -Each [release](https://github.com/GenOrca/unreal-mcp/releases) ships two kinds of plugin asset — pick whichever fits: +Each [release](https://github.com/GenOrca/unreal-mcp/releases) ships two kinds of plugin asset. **Most users want the precompiled one for their exact engine version:** -- **`UnrealMCPython__.zip`** (e.g. `UnrealMCPython_5.7_2.2.0.zip`) — **precompiled** for that exact UE version. No C++ toolchain required; just drop it in. -- **`UnrealMCPython-v.zip`** — **source only** (the CI release pipeline runs on Linux and does not compile the C++ module). Unreal builds the module on first open, which needs a C++ toolchain. +- ✅ **`UnrealMCPython__.zip`** (e.g. `UnrealMCPython_5.8_2.2.0.zip`) — **precompiled** for that exact UE version. No C++ toolchain, no rebuild — just drop it in and launch. **Pick the one matching your engine version.** +- 🛠️ **`UnrealMCPython-v.zip`** — **source only**, for C++ developers (the CI release pipeline runs on Linux and does not compile the C++ module). Unreal tries to *compile* it on first open, which **requires Visual Studio with the "Game development with C++" workload**. Without that toolchain the build fails and the editor closes — so don't use this one unless you intend to compile. Extract, then copy `Plugins/UnrealMCPython/` into your project's `Plugins/` folder: @@ -137,7 +137,10 @@ YourProject/ Keep the `mcp-server/` folder from the zip in a convenient location — you'll need its path in Step 3. > [!NOTE] -> Precompiled binaries are engine-version-specific. If there's no `__` zip for your version, use the source zip and let Unreal compile it on first open (Windows: Visual Studio with the "Game development with C++" workload). Maintainers build the per-version binaries locally with `tools/build-plugin.ps1` (the CI pipeline can't — GitHub-hosted runners have no Unreal Engine). +> Precompiled binaries are engine-version-specific. If there's no `__` zip for your version, either ask for one in an issue or use the source zip and let Unreal compile it on first open (Windows: Visual Studio with the "Game development with C++" workload). Maintainers build the per-version binaries locally with `tools/build-plugin.ps1` (the CI pipeline can't — GitHub-hosted runners have no Unreal Engine). + +> [!WARNING] +> **Seeing `'UnrealMCPython' was designed for build 5.7.0 … load anyway?` or a rebuild that fails and closes the editor?** You downloaded the **source** zip (or a binary for a different engine version). Download the **`UnrealMCPython__.zip`** that matches your engine instead — it loads without compiling. (Source builds from releases ≤ 2.2.0 also pin an old engine version; this is fixed on `main`.) **Option B: Install from [Fab](https://fab.com/s/aed5f75d50b2)**