# Cannot construct objects of type

**URL:** <https://forums.unrealengine.com/t/cannot-construct-objects-of-type/412983>\
**Category:** Blueprint\
**Tags:** construction, unreal-engine, Blueprint, question, CPP\
**Created:** [December 23, 2017, 12:07pm UTC](https://forums.unrealengine.com/t/cannot-construct-objects-of-type/412983 "2017-12-23T12:07:08Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![GameRaccoon](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/gameraccoon/32/642426_2.png) [@GameRaccoon](https://forums.unrealengine.com/u/GameRaccoon)\
**Post date:** [December 23, 2017, 12:07pm UTC](https://forums.unrealengine.com/t/cannot-construct-objects-of-type/412983/1 "2017-12-23T12:07:08Z")

</div>

After upgrading to 4.18 I got new errors in my blueprints on creation objects from C++ class using “Construct Object from Class” node.

![224861-cannotconstruct.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/d/8/9/d89c21a03d765df489da4a7e8a7a3bffb026ae04.png)

This code worked well with 4.16 and it looks like it’s not working since 4.17.

Project has no compilation errors or warnings in C++ code.

Sources of the class that I’m trying to construct: [CommandHistory.h][2] [CommandHistory.cpp][3]

What I’ve already tried:

- Remove the node and create it again (nothing changed)
- Clean the project and rebuild it (nothing changed)
- Get rid of default constructor in my class in case of some other constructor is used (nothing changed)
- Upgrade and build project on a different PC in case of broken UE4 installation (nothing changed)

---

<div class="post-metadata">

**Author:** ![birdfreeyahoo](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@birdfreeyahoo](https://forums.unrealengine.com/u/birdfreeyahoo)\
**Post date:** [December 23, 2017, 2:44pm UTC](https://forums.unrealengine.com/t/cannot-construct-objects-of-type/412983/2 "2017-12-23T14:44:03Z")

</div>

Did you try using BlueprintType in the UCLASS specifier?

---

<div class="post-metadata">

**Author:** ![GameRaccoon](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/gameraccoon/32/642426_2.png) [@GameRaccoon](https://forums.unrealengine.com/u/GameRaccoon)\
**Post date:** [December 23, 2017, 5:46pm UTC](https://forums.unrealengine.com/t/cannot-construct-objects-of-type/412983/3 "2017-12-23T17:46:02Z")

</div>

That helped! Thanks!

---

<div class="post-metadata">

**Author:** ![PC-hris](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@PC-hris](https://forums.unrealengine.com/u/PC-hris)\
**Post date:** [March 5, 2019, 8:39am UTC](https://forums.unrealengine.com/t/cannot-construct-objects-of-type/412983/4 "2019-03-05T08:39:44Z")

</div>

Can you elaborate what that means?

---

<div class="post-metadata">

**Author:** ![Athelios](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Athelios](https://forums.unrealengine.com/u/Athelios)\
**Post date:** [March 8, 2019, 1:21pm UTC](https://forums.unrealengine.com/t/cannot-construct-objects-of-type/412983/5 "2019-03-08T13:21:36Z")

</div>

It means you declare class as follows:

```
UCLASS(BlueprintType)
class ... : public UObject
{
GENERATED_BODY()
};
```

---

<div class="post-metadata">

**Author:** ![PC-hris](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@PC-hris](https://forums.unrealengine.com/u/PC-hris)\
**Post date:** [March 9, 2019, 10:55pm UTC](https://forums.unrealengine.com/t/cannot-construct-objects-of-type/412983/6 "2019-03-09T22:55:30Z")

</div>

Is there a way to do this for a blueprint class?

---

<div class="post-metadata">

**Author:** ![dgodfrey](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@dgodfrey](https://forums.unrealengine.com/u/dgodfrey)\
**Post date:** [December 6, 2022, 4:29pm UTC](https://forums.unrealengine.com/t/cannot-construct-objects-of-type/412983/7 "2022-12-06T16:29:34Z")

</div>

I already did this and I’m still getting that error:

Error: Cannot construct objects of type ‘/Script/BlahBlah.Function’ in Construct Object from Class

---

<div class="post-metadata">

**Author:** ![Vlady\_Veselinov](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/vlady_veselinov/32/621446_2.png) [@Vlady\_Veselinov](https://forums.unrealengine.com/u/Vlady_Veselinov)\
**Post date:** [November 19, 2023, 3:11am UTC](https://forums.unrealengine.com/t/cannot-construct-objects-of-type/412983/8 "2023-11-19T03:11:39Z")

</div>

This is also broken for me, no actionable feedback from the compiler

 ![UnrealEditor_uwKSBwIsJL](https://d3kjluh73b9h9o.cloudfront.net/original/4X/9/0/a/90a5768cba1c4740cd77b101f8d372b7ad519ce5.png)

---

<div class="post-metadata">

**Author:** ![Vlady\_Veselinov](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/vlady_veselinov/32/621446_2.png) [@Vlady\_Veselinov](https://forums.unrealengine.com/u/Vlady_Veselinov)\
**Post date:** [November 19, 2023, 3:55am UTC](https://forums.unrealengine.com/t/cannot-construct-objects-of-type/412983/9 "2023-11-19T03:55:42Z")

</div>

Check what object you inherit from, if it’s Actor, you need to use

```auto
Spawn Actor From Class

```
