# Does UObject has a callback for when the "Construct Object from Class" is done?

**URL:** <https://forums.unrealengine.com/t/does-uobject-has-a-callback-for-when-the-construct-object-from-class-is-done/1374290>\
**Category:** C++\
**Tags:** uobject, unreal-engine, question, Blueprint, CPP\
**Created:** [November 8, 2023, 8:30pm UTC](https://forums.unrealengine.com/t/does-uobject-has-a-callback-for-when-the-construct-object-from-class-is-done/1374290 "2023-11-08T20:30:08Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![calmattt](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@calmattt](https://forums.unrealengine.com/u/calmattt)\
**Post date:** [November 8, 2023, 8:30pm UTC](https://forums.unrealengine.com/t/does-uobject-has-a-callback-for-when-the-construct-object-from-class-is-done/1374290/1 "2023-11-08T20:30:09Z")

</div>

Hi,

I have the following model:

```auto
UCLASS(BlueprintType, Blueprintable)
class MYSPACESHIPGAME_API UStarCluster : public UObject
{
	GENERATED_BODY()

private:
	
	UPROPERTY(BlueprintReadOnly, Category = "Stars", meta = (AllowPrivateAccess = "true", ExposeOnSpawn = "true"))
	FName Name;

	UPROPERTY(BlueprintReadOnly, Category = "Stars", meta = (AllowPrivateAccess = "true", ExposeOnSpawn = "true"))
	TArray<FStarData> Stars;
...

```

And I’m constructing it using “Construct Object from Class”.

![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/4/8/3/4830630ea51ec5049d174922d86b20dea204e6f3.png)

Is there any method from the `UObject` interface called after this node finished? I found `virtual void PostInitProperties();` but `Stars` and `Name` values are not set at this time yet.

Thanks in advance!  
Mateus.

---

<div class="post-metadata">

**Author:** ![MagForceSeven](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/magforceseven/32/906563_2.png) [@MagForceSeven](https://forums.unrealengine.com/u/MagForceSeven)\
**Post date:** [November 9, 2023, 2:24am UTC](https://forums.unrealengine.com/t/does-uobject-has-a-callback-for-when-the-construct-object-from-class-is-done/1374290/2 "2023-11-09T02:24:34Z")

</div>

What problem are you trying to solve exactly? Return Value is a fully constructed instance of your class.

Are you trying to do something on your UObject similar to BeginPlay?

---

<div class="post-metadata">

**Author:** ![calmattt](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@calmattt](https://forums.unrealengine.com/u/calmattt)\
**Post date:** [November 9, 2023, 12:34pm UTC](https://forums.unrealengine.com/t/does-uobject-has-a-callback-for-when-the-construct-object-from-class-is-done/1374290/3 "2023-11-09T12:34:13Z")

</div>

Oh, I’m sorry it was not clear.

Yes, I’m wondering if exists something like `OnConstruction` or `BeginPlay` for `UObject` that is called after the variables referenced on the “Construct Object from Class” node gets assigned. I would like to use them for performing calculations on the object without doing any callback after getting the returned constructed object.

Thanks for the reply!

---

<div class="post-metadata">

**Author:** ![MagForceSeven](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/magforceseven/32/906563_2.png) [@MagForceSeven](https://forums.unrealengine.com/u/MagForceSeven)\
**Post date:** [November 9, 2023, 1:52pm UTC](https://forums.unrealengine.com/t/does-uobject-has-a-callback-for-when-the-construct-object-from-class-is-done/1374290/4 "2023-11-09T13:52:06Z")

</div>

Sadly not. For UObjects you’ve got to either call your own Init type function yourself, or wrap it in some other type of construction call like Widgets do. They are UObjects but have an OnConstruct callback built into how they are created by UMG.

---

<div class="post-metadata">

**Author:** ![system](https://d3kjluh73b9h9o.cloudfront.net/original/4X/7/1/3/713c9d3f58553f0de89543d76a8a3a2779dc9fa4.png) [@system](https://forums.unrealengine.com/u/system)\
**Post date:** [December 9, 2023, 1:52pm UTC](https://forums.unrealengine.com/t/does-uobject-has-a-callback-for-when-the-construct-object-from-class-is-done/1374290/5 "2023-12-09T13:52:33Z")

</div>

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
