Hello,
I don’t expect to have made it in time, but I want to leave this here for everyone who is having this exact problem (like you and me).
The solution is to access the Construction script of the blueprint, there you get the USCSNodes - the complete component hierarchy as a list, if you want - and then you convert those nodes to USceneComponents.
I do this with those two methods:
TArray<USCS_Node*> USOLIDBPFunctionLibrary::GetAllBlueprintNodes(UBlueprint* Blueprint)
{
TArray<USCS_Node*> uscsNodes;
if (Blueprint != NULL)
{
uscsNodes = Blueprint->SimpleConstructionScript->GetAllNodes();
}
return uscsNodes;
}
To convert the nodes individually you can use this function:
USceneComponent* SOLIDBPFunctionLibrary::GetComponentFromNode(USCS_Node* Node)
{
if (Node != NULL)
{
return Cast<USceneComponent>(Node->ComponentTemplate);
}
return nullptr;
}
But for sure it would be cooler if “GetAllComponents” would actually work on the received CDO of a blueprint, which still does not.
Kind regards,
Mirko