Hello is it possible Epic can have UFUNCTIONS that have the meta tag’s: DeterminesOutputType & DynamicOutputParam, support for TSoftObjectPtr and TSoftClassPtr?
This is a quality of life improvement for Blueprint users and frankly if I knew where in the engine to add that support for Reflection to do this, I would do it myself and make a Pull Request(if anybody wants to respond to this question with where, then I would happily do it and link the PR in here for anybody wanting to upvote it). I hope somebody from Epic sees this post and does tell me if they’re gonna do so or at least tell me where in the engine I could do so(and then I’ll make a PR).
Thank you Epic for making Unreal Engine open source and please continue making it better for us devs!
(also noting that I am making this post in the UE5 Early Access forum because for some reason in the feedback forum’s I cannot post in there because it requires an engine tag but no engine tags show up and it won’t let me post because of that)
3 Likes
I made it worked by editing UE\Engine\Source\Editor\BlueprintGraph\Private\K2Node_CallFunction.cpp
Inside the funciont FDynamicOutputHelper::GetPinClass(UEdGraphPin* Pin) I’ve modified bIsClassOrObjectPin to this:
bool const bIsClassOrObjectPin = (Pin->PinType.PinCategory == UEdGraphSchema_K2::PC_Class || Pin->PinType.PinCategory == UEdGraphSchema_K2::PC_Object || Pin->PinType.PinCategory == UEdGraphSchema_K2::PC_SoftClass || Pin->PinType.PinCategory == UEdGraphSchema_K2::PC_SoftObject);
2 Likes
Bumping this. It’s quite silly to me that this isn’t already supported.
Bump. Would love to see this implemented!
Unfortunately, in UE 5.3.2 this was not enough for me. I made it work doing this in
FDynamicOutputHelper::GetPinClass of K2Node_CallFunction.cpp:
bool const bIsClassOrObjectPin = (Pin->PinType.PinCategory == UEdGraphSchema_K2::PC_Class || Pin->PinType.PinCategory == UEdGraphSchema_K2::PC_Object);
bool const bIsSoftClassOrObjectPin = (Pin->PinType.PinCategory == UEdGraphSchema_K2::PC_SoftClass || Pin->PinType.PinCategory == UEdGraphSchema_K2::PC_SoftObject);
if (bIsClassOrObjectPin || bIsSoftClassOrObjectPin)
{
if (bIsClassOrObjectPin)
{
if (UClass* DefaultClass = Cast<UClass>(Pin->DefaultObject))
{
PinClass = DefaultClass;
}
else if (UClass* BaseClass = Cast<UClass>(Pin->PinType.PinSubCategoryObject.Get()))
{
PinClass = BaseClass;
}
}
else if (bIsSoftClassOrObjectPin)
{
if (UClass* DefaultClass = StaticLoadClass(UObject::StaticClass(), nullptr, *Pin->DefaultValue, nullptr, LOAD_None, nullptr))
{
PinClass = DefaultClass;
}
}