# How does FObjectInitializer work?

**URL:** <https://forums.unrealengine.com/t/how-does-fobjectinitializer-work/362899>\
**Category:** C++\
**Tags:** classes, unreal-engine, question, CPP\
**Created:** [July 4, 2016, 2:11pm UTC](https://forums.unrealengine.com/t/how-does-fobjectinitializer-work/362899 "2016-07-04T14:11:20Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Sheeplie](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Sheeplie](https://forums.unrealengine.com/u/Sheeplie)\
**Post date:** [July 4, 2016, 2:11pm UTC](https://forums.unrealengine.com/t/how-does-fobjectinitializer-work/362899/1 "2016-07-04T14:11:20Z")

</div>

I’ve been reading the documentation about this.

```
UMyObject::UMyObject(const FObjectInitializer& ObjectInitializer)
: Super(ObjectInitializer)
{
    // Initialize CDO properties here.
}

```

I know that this is used so that you can run the ObjectInitializer’s constructor within your new classes constructor. ObjectInitializer is declared as a reference of type FObjectInitializer. Does that mean you have to supply the code with a reference parameter?

---

<div class="post-metadata">

**Author:** ![Ivan3z](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Ivan3z](https://forums.unrealengine.com/u/Ivan3z)\
**Post date:** [June 15, 2023, 6:12pm UTC](https://forums.unrealengine.com/t/how-does-fobjectinitializer-work/362899/2 "2023-06-15T18:12:58Z")

</div>

To override default components classes

 ![21](https://d3kjluh73b9h9o.cloudfront.net/original/4X/b/c/2/bc283fa5c59b7d0daf14a241783faf2e6d9712d3.png)
