More work on properties of components

This commit is contained in:
2026-03-19 16:26:00 -04:00
parent 56f2257dd9
commit 2eb2be7af1
5 changed files with 39 additions and 12 deletions

View File

@@ -3,6 +3,7 @@
#include "WingServer.h"
#include "WingTypes.h"
#include "Engine/Blueprint.h"
#include "Engine/SCS_Node.h"
#include "MaterialGraph/MaterialGraphNode.h"
#include "EdGraph/EdGraphPin.h"
#include "UObject/EnumProperty.h"
@@ -138,6 +139,19 @@ TArray<FWingProperty> FWingProperty::GetAll(UObject* Obj, EPropertyFlags Flags)
Obj = BP->GeneratedClass->GetDefaultObject();
}
// SCS nodes don't have useful editable properties.
// Redirect to the component template instead.
//
if (USCS_Node* Node = ::Cast<USCS_Node>(Obj))
{
if (!Node->ComponentTemplate)
{
UWingServer::Printf(TEXT("ERROR: SCS node '%s' has no component template\n"), *Obj->GetName());
return {};
}
Obj = Node->ComponentTemplate;
}
TArray<FWingProperty> Result;
Collect(Obj->GetClass(), Obj, Result, Flags);