ue-mcp 1.0.44 → 1.0.45

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -26,6 +26,6 @@
26
26
  "statetree": 35,
27
27
  "plugins": 2
28
28
  },
29
- "generatedAt": "2026-05-25T23:35:01.093Z",
30
- "version": "1.0.44"
29
+ "generatedAt": "2026-05-26T01:00:37.695Z",
30
+ "version": "1.0.45"
31
31
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ue-mcp",
3
- "version": "1.0.44",
3
+ "version": "1.0.45",
4
4
  "description": "Unreal Engine MCP server - 21 tools, 556+ actions for AI-driven editor control",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -22,6 +22,9 @@
22
22
  #include "GameFramework/Pawn.h"
23
23
  #include "GameFramework/SpectatorPawn.h"
24
24
  #include "Engine/DebugCameraController.h"
25
+ #include "Engine/GameViewportClient.h"
26
+ #include "ImageUtils.h"
27
+ #include "Async/Async.h"
25
28
 
26
29
  namespace UEMCPPIE
27
30
  {
@@ -597,9 +600,26 @@ namespace UEMCPPIE
597
600
  const uint64 FrameIdx = static_cast<uint64>(FramesCompared);
598
601
  if ((FrameIdx % static_cast<uint64>(Pending.CaptureFrameEvery)) == 0)
599
602
  {
600
- const FString FullPath = CaptureDir / FString::Printf(TEXT("frame_%05llu.png"), FrameIdx);
601
- FScreenshotRequest::RequestScreenshot(FullPath, /*bShowUI*/false, /*bAddFilenameSuffix*/false);
602
- FramesCaptured++;
603
+ UGameViewportClient* VC = PIEWorld->GetGameViewport();
604
+ FViewport* Viewport = VC ? VC->Viewport : nullptr;
605
+ if (Viewport)
606
+ {
607
+ TArray<FColor> Pixels;
608
+ if (Viewport->ReadPixels(Pixels))
609
+ {
610
+ const int32 W = Viewport->GetSizeXY().X;
611
+ const int32 H = Viewport->GetSizeXY().Y;
612
+ const FString FullPath = CaptureDir / FString::Printf(TEXT("frame_%05llu.png"), FrameIdx);
613
+ AsyncTask(ENamedThreads::AnyBackgroundThreadNormalTask,
614
+ [Pixels = MoveTemp(Pixels), W, H, FullPath]()
615
+ {
616
+ TArray64<uint8> PNG;
617
+ FImageUtils::PNGCompressImageArray(W, H, Pixels, PNG);
618
+ FFileHelper::SaveArrayToFile(PNG, *FullPath);
619
+ });
620
+ FramesCaptured++;
621
+ }
622
+ }
603
623
  }
604
624
  }
605
625