Commit Graph

3 Commits

Author SHA1 Message Date
Joshua Deville
226a979d66 Fix hard crash in SpawnActor node creation
UK2Node_SpawnActorFromClass::PostPlacedNewNode() (engine source)
overrides the base class without calling Super::PostPlacedNewNode(),
and unconditionally dereferences GetScaleMethodPin() via
FindPinChecked -- but that pin is only created in
AllocateDefaultPins(), which FGraphNodeCreator::Finalize() always
calls *after* PostPlacedNewNode(). Result: a hard assertion failure
(EdGraphNode.h:586) that crashes the whole editor, every time,
regardless of any node_json parameters.

The real editor UI never hits this because it creates nodes through
a different path (node spawner templates) that doesn't have this
ordering problem. Our plugin uses the generic FGraphNodeCreator
pattern directly, so it does.

Fix: manually call SpawnNode->AllocateDefaultPins() before
Creator.Finalize(), so pins already exist by the time
PostPlacedNewNode() runs. Verified: SpawnActor node now creates
cleanly with all expected pins (Class, SpawnTransform, etc), editor
stayed stable and MCP connection alive afterward.

Rebuilt via Live Coding successfully this time (Ctrl+Alt+F11) --
the earlier UbaCli spawn failure appears to have been a one-off,
possibly from a conflicting concurrent Build.bat invocation.
2026-07-08 22:33:50 -04:00
Joshua Deville
8ac602168d Fix wildcard pin resolution in UnrealMCPython's ConnectBlueprintPins
ConnectBlueprintPins called SourcePin->MakeLinkTo(TargetPin) but never
notified either node of the new connection, so wildcard-typed pins
(MacroInstance nodes like ForEachLoop, and by extension any wildcard
array/map library call) never resolved their type -- compilation
failed with "type ... is undetermined" regardless of how many times
you recompiled. The real graph editor triggers this via the schema's
TryCreateConnection; MakeLinkTo alone doesn't.

Fix: call NodeConnectionListChanged() on both nodes after linking,
matching what the schema does. Verified against the exact ForEachLoop
scenario that failed twice before the fix -- the Array pin now
resolves to a concrete type and the graph compiles.

Rebuilt via full offline Build.bat (UnrealEditor target) rather than
Live Coding -- Live Coding's patch-link step hit a persistent
"Could not spawn process UbaCli.exe (Error 267)" in this environment,
unrelated to the code change itself (the .cpp compiled cleanly both
times; only the hot-patch link step failed).
2026-07-08 20:37:33 -04:00
Joshua Deville
496320cc8c Add empty test level and Unreal MCP tooling
- L_TestFlight: empty, zero-gravity level for Phase 0 flight testing,
  set as editor/game default map.
- Enable UnrealMCPython + Python Editor Script Plugin, third-party
  MCP plugin (GenOrca/unreal-mcp v2.2.0) giving direct editor control
  (actors, blueprints, levels, materials, etc.) alongside Epic's
  built-in Unreal MCP plugin.
- Vendor the mcp-server Python source used to bridge to the plugin.
- .mcp.json intentionally gitignored (machine-specific absolute paths).
2026-07-08 14:56:57 -04:00