I have trouble Googling for this, which tells me it’s not likely to exist
I have a custom UObject type defined in C++ which requires complex initialization. I’d like to forbid Blueprints from offering the typical '“Construct Object From Class” in favor of my own function. Or put another way, I’d like the “Construct Object From Class” node to have special behavior for my type: call into a specific function rather than do its default behavior of manually exposing each property as a pin.
Hey - Can you provide more info on what you want to achieve?
IIRC There is no way to override “Construct Object From Class**”** as it is really generic. If I’m understanding you correctly here is what i would do:
Firstly, mark your whole class as not blueprintable, so it can be referenced in BP’s but not constructed
Secondly, create a custom function that you will use to create your class with while initialization params
UCLASS(NotBlueprintable)
class YOURMODULE_API UMyObject : public UObject
{
GENERATED_BODY()
public:
UFUNCTION(BlueprintCallable, Category="MyObject")
static UMyObject* CreateMyObject(UObject* Outer, int32 InitParam);
};
If you provide more info, mybe I’ll be able to offer you a better solution