fix(cpp): UE 5.8 compatibility for FJsonObject::Values key type - #55
Merged
Conversation
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).
This was referenced Jun 19, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
UE 5.8 changed
FJsonObject::Values' key type fromFStringtoUE::FSharedString. Iterating->Valuesand usingPair.Keydirectly as anFStringbroke compilation on 5.8 (C2440/C2664). This ports the source so it builds on both 5.7 and 5.8.Fix
operator*yieldsconst TCHAR*on bothFString(5.7) andUE::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 iteration site (
MCPythonHelper_BehaviorTree.cpp) already used*Pair.Key, so no change there.Verification
RunUAT BuildPlugin→ BUILD SUCCESSFUL (DLL + PDB +.modulesproduced).*→const TCHAR*), so the already-releasedUnrealMCPython_5.7_2.2.0.zipstays valid. (5.7 not re-built here — engine no longer installed on the build machine; change is provably backward-compatible.)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.0now 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 existingv2.2.0release.