Fix UE 5.7 compatibility: replace ANY_PACKAGE + add static_mesh to spawn_actor#54
Open
krsmer wants to merge 1 commit into
Open
Conversation
- Replace deprecated ANY_PACKAGE with nullptr in FindObject<UClass>() calls (UnrealMCPBlueprintCommands.cpp, UnrealMCPBlueprintNodeCommands.cpp) which was removed in UE 5.1+ and causes compile errors on UE 5.7 - Add static_mesh parameter to spawn_actor C++ handler so a mesh asset path can be assigned directly at spawn time for StaticMeshActors - Expose static_mesh as optional parameter in Python spawn_actor tool Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
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.
Summary
ANY_PACKAGEwithnullptrin allFindObject<UClass>()calls inUnrealMCPBlueprintCommands.cppandUnrealMCPBlueprintNodeCommands.cpp.ANY_PACKAGEwas removed in UE 5.1+ and causes build errors on UE 5.5–5.7.static_meshparameter tospawn_actor(both C++ handler and Python tool) so aStaticMeshActorcan be spawned with a mesh asset assigned in one call (e.g./Engine/BasicShapes/Cube.Cube).Changes
UnrealMCPBlueprintCommands.cppANY_PACKAGE→nullptr(4 occurrences)UnrealMCPBlueprintNodeCommands.cppANY_PACKAGE→nullptr(5 occurrences)UnrealMCPEditorCommands.cppstatic_meshparam providedPython/tools/editor_tools.pystatic_meshoptional param inspawn_actortoolTest plan
spawn_actorwithstatic_mesh="/Engine/BasicShapes/Cube.Cube"spawns a visible cubespawn_actorwithoutstatic_meshstill works as before🤖 Generated with Claude Code