Skip to content

fix(cpp): UE 5.8 compatibility for FJsonObject::Values key type - #55

Merged
zenoengine merged 1 commit into
devfrom
feat/ue5.8-support
Jun 18, 2026
Merged

fix(cpp): UE 5.8 compatibility for FJsonObject::Values key type#55
zenoengine merged 1 commit into
devfrom
feat/ue5.8-support

Conversation

@zenoengine

Copy link
Copy Markdown
Collaborator

What

UE 5.8 changed FJsonObject::Values' key type from FString to UE::FSharedString. Iterating ->Values and using Pair.Key directly as an FString broke compilation on 5.8 (C2440/C2664). This ports the source so it builds on both 5.7 and 5.8.

Fix

operator* yields const TCHAR* on both FString (5.7) and UE::FSharedString (5.8), so dereference the key at the two break sites:

  • MCPythonTcpServer.cppFString KeyString = *Pair.Key;
  • MCPythonHelper.cppFindPinByName(NewNode, FString(*Pair.Key), …)

A third iteration site (MCPythonHelper_BehaviorTree.cpp) already used *Pair.Key, so no change there.

Verification

  • UE 5.8 RunUAT BuildPluginBUILD SUCCESSFUL (DLL + PDB + .modules produced).
  • Source-compatible with 5.7: the change uses only standard FString API (*const TCHAR*), so the already-released UnrealMCPython_5.7_2.2.0.zip stays valid. (5.7 not re-built here — engine no longer installed on the build machine; change is provably backward-compatible.)
  • Offline gates (drift / routing / unwrap) untouched — no Python or catalog change.

Not covered

In-editor (gate 3) / E2E (gate 4) have not been run on a 5.8 editor — only compile+link verified. Recommend dropping the 5.8 binary into a 5.8 editor and running run_all + E2E before relying on it in production.

Release

No version bump: 2.2.0 now ships two engine-target binaries (_5.7_ / _5.8_), same as the KawaiiPhysics per-version model. The 5.8 zip is built and ready to attach to the existing v2.2.0 release.

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).
@zenoengine
zenoengine merged commit b551b1c into dev Jun 18, 2026
1 check passed
@zenoengine
zenoengine deleted the feat/ue5.8-support branch June 18, 2026 12:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant