# Is there any way in C++ to replace the default "Construct Object from Class" BP node, for a specific class?

**URL:** <https://forums.unrealengine.com/t/is-there-any-way-in-c-to-replace-the-default-construct-object-from-class-bp-node-for-a-specific-class/2656408>\
**Category:** Programming & Scripting\
**Tags:** unreal-engine, custom-nodes, CPP, Blueprint, question\
**Created:** [September 13, 2025, 8:36pm UTC](https://forums.unrealengine.com/t/is-there-any-way-in-c-to-replace-the-default-construct-object-from-class-bp-node-for-a-specific-class/2656408 "2025-09-13T20:36:25Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![heyx3](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@heyx3](https://forums.unrealengine.com/u/heyx3)\
**Post date:** [September 13, 2025, 8:36pm UTC](https://forums.unrealengine.com/t/is-there-any-way-in-c-to-replace-the-default-construct-object-from-class-bp-node-for-a-specific-class/2656408/1 "2025-09-13T20:36:25Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![Gawron10001](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/gawron10001/32/1038704_2.png) [@Gawron10001](https://forums.unrealengine.com/u/Gawron10001)\
**Post date:** [September 14, 2025, 1:32am UTC](https://forums.unrealengine.com/t/is-there-any-way-in-c-to-replace-the-default-construct-object-from-class-bp-node-for-a-specific-class/2656408/2 "2025-09-14T01:32:19Z")

</div>

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

```auto
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 🙂

---

<div class="post-metadata">

**Author:** ![Auran131](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Auran131](https://forums.unrealengine.com/u/Auran131)\
**Post date:** [September 14, 2025, 5:48am UTC](https://forums.unrealengine.com/t/is-there-any-way-in-c-to-replace-the-default-construct-object-from-class-bp-node-for-a-specific-class/2656408/3 "2025-09-14T05:48:58Z")

</div>

if you know the exact class params then just wrap it in a static function.

if however you need advanced functionality its actually the K2Node you need to override and use TSubclassOf to limit you your class

---

<div class="post-metadata">

**Author:** ![heyx3](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@heyx3](https://forums.unrealengine.com/u/heyx3)\
**Post date:** [September 14, 2025, 3:00pm UTC](https://forums.unrealengine.com/t/is-there-any-way-in-c-to-replace-the-default-construct-object-from-class-bp-node-for-a-specific-class/2656408/4 "2025-09-14T15:00:10Z")

</div>

Hi, I’m honestly not sure what else to add about it…it’s an object with a lot of initialization logic, and it’s much nicer to have that logic run in the same BP node that constructs the object so that there’s no way to have a half-initialized instance. I have a static UFUNCTION which does this but the user can still improperly construct an instance using the usual Construct Object From Class node.

---

<div class="post-metadata">

**Author:** ![Auran131](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Auran131](https://forums.unrealengine.com/u/Auran131)\
**Post date:** [September 14, 2025, 4:33pm UTC](https://forums.unrealengine.com/t/is-there-any-way-in-c-to-replace-the-default-construct-object-from-class-bp-node-for-a-specific-class/2656408/5 "2025-09-14T16:33:55Z")

</div>

> [@Gawron10001](#):
>
> `UCLASS(NotBlueprintable)`

like Gawron said this should do the trick?

---

<div class="post-metadata">

**Author:** ![heyx3](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@heyx3](https://forums.unrealengine.com/u/heyx3)\
**Post date:** [September 14, 2025, 8:09pm UTC](https://forums.unrealengine.com/t/is-there-any-way-in-c-to-replace-the-default-construct-object-from-class-bp-node-for-a-specific-class/2656408/6 "2025-09-14T20:09:01Z")

</div>

I thought this prevents subclassing in BP, not construction? I can try it out locally but every resource I find on this mentions the former and not the latter. I do need the ability to subclass it in BP, for the record.

---

<div class="post-metadata">

**Author:** ![nande](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/nande/32/1057698_2.png) [@nande](https://forums.unrealengine.com/u/nande)\
**Post date:** [September 14, 2025, 11:21pm UTC](https://forums.unrealengine.com/t/is-there-any-way-in-c-to-replace-the-default-construct-object-from-class-bp-node-for-a-specific-class/2656408/7 "2025-09-14T23:21:40Z")

</div>

if i understand correctly, imho this seems like a really bad pattern. i think the appropriate thing to do is ensure the initialization happens more sanely. either by the base class, or some other manager.

and ensure that not being initialized doesn’t destroys the universe, which is completely legal.

alternatively you can upgrade it to an actor (without scene root), and have it’s parameters exposed on spawn. maybe you’ll need a bp base for that.

---

<div class="post-metadata">

**Author:** ![Auran131](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Auran131](https://forums.unrealengine.com/u/Auran131)\
**Post date:** [September 15, 2025, 6:17am UTC](https://forums.unrealengine.com/t/is-there-any-way-in-c-to-replace-the-default-construct-object-from-class-bp-node-for-a-specific-class/2656408/8 "2025-09-15T06:17:20Z")

</div>

> [@nande](#):
>
> alternatively you can upgrade it to an actor (without scene root), and have it’s parameters exposed on spawn

UObjects support expose on spawn too

> [@heyx3](#):
>
> I thought this prevents subclassing in BP,

you might be right ive not tried it myself, essentially you’re trying to block your class from the original construct Node? I wouldnt recommend modifying a engine node so aside from hiding your class from blueprint i’m not sure you can.

it might just be better to log a warning or even crash inside your class if its not intialized

---

<div class="post-metadata">

**Author:** ![heyx3](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@heyx3](https://forums.unrealengine.com/u/heyx3)\
**Post date:** [September 17, 2025, 8:18pm UTC](https://forums.unrealengine.com/t/is-there-any-way-in-c-to-replace-the-default-construct-object-from-class-bp-node-for-a-specific-class/2656408/9 "2025-09-17T20:18:01Z")

</div>

Yeah currently I log errors, but always better to make it impossible to use incorrectly 😛

What’s weird to me is that Unreal allows custom Make and Break functions for _structs_, so you can do this for a struct even though structs are meant to be much simpler than Objects.
