ultimate-unreal-engine-mcp 0.1.13 → 0.1.14

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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ultimate-unreal-engine-mcp",
3
- "version": "0.1.13",
3
+ "version": "0.1.14",
4
4
  "description": "MCP server giving AI assistants full access to Unreal Engine 5.7 projects",
5
5
  "type": "module",
6
6
  "engines": {
@@ -478,8 +478,35 @@ void RegisterActorCommands(FMCPCommandRouter& Router)
478
478
  return;
479
479
  }
480
480
 
481
- // Find the UPROPERTY by name on the actor's class.
482
- FProperty* Prop = TargetActor->GetClass()->FindPropertyByName(FName(*PropertyName));
481
+ // Optional component_name if set, resolve property on the named component
482
+ // instead of the actor itself. Enables "DoorMesh" + "StaticMesh" patterns.
483
+ UObject* PropertyOwner = TargetActor;
484
+ FString ComponentName;
485
+ if (Payload->TryGetStringField(TEXT("component_name"), ComponentName) && !ComponentName.IsEmpty())
486
+ {
487
+ UActorComponent* Comp = TargetActor->FindComponentByClass<UActorComponent>();
488
+ // Search all components by their subobject name.
489
+ TInlineComponentArray<UActorComponent*> Components;
490
+ TargetActor->GetComponents(Components);
491
+ UActorComponent* FoundComp = nullptr;
492
+ for (UActorComponent* C : Components)
493
+ {
494
+ if (C && C->GetName() == ComponentName)
495
+ {
496
+ FoundComp = C;
497
+ break;
498
+ }
499
+ }
500
+ if (!FoundComp)
501
+ {
502
+ SendResponse(BuildActorErrorResponse(CorrId, TEXT("component_not_found")) + TEXT("\n"));
503
+ return;
504
+ }
505
+ PropertyOwner = FoundComp;
506
+ }
507
+
508
+ // Find the UPROPERTY by name on the target object's class.
509
+ FProperty* Prop = PropertyOwner->GetClass()->FindPropertyByName(FName(*PropertyName));
483
510
  if (!Prop)
484
511
  {
485
512
  SendResponse(BuildActorErrorResponse(CorrId, TEXT("property_not_found")) + TEXT("\n"));
@@ -487,7 +514,7 @@ void RegisterActorCommands(FMCPCommandRouter& Router)
487
514
  }
488
515
 
489
516
  TargetActor->Modify();
490
- void* ValuePtr = Prop->ContainerPtrToValuePtr<void>(TargetActor);
517
+ void* ValuePtr = Prop->ContainerPtrToValuePtr<void>(PropertyOwner);
491
518
 
492
519
  if (ValueType == TEXT("bool"))
493
520
  {