Developer Notes

Workaround is to set the Object variable type to an actual Object blueprint.

Description

REGRESSION: Technically a regression from 4.16

Object variables aren't accepted by Construct Object class, even if the value is set to an Object blueprint. The following error is generated:

Cannot construct objects of type '/Script/CoreUObject.Object' in  Construct Object from Class

Workaround is to set the Object variable type to an actual Object blueprint.

Steps to Reproduce
  1. Open QAGame in editor.
  2. Create an Object blueprint, name it TestObject.
  3. Open the level blueprint.
  4. Drag off Event BeginPlay and add a Construct Object node.
  5. Set Class to TestObject (you can also promote Outer to Variable to remove an inevitable warning).
  6. Compile. Notice it compiles successfully.
  7. Right-click the Class input and select Promote to Variable.
  8. Compile again.

RESULT

The object variable isn't accept and generates compile error, even though the value is set to TestObject.

WORKAROUND

Set the variable type to TestObject.

Have Comments or More Details?

There's no existing public thread on this issue, so head over toAnswerHub just mention UE-48436 in the post.

25
Login to Vote

Fixed
ComponentGameplay - Blueprint
Affects Versions4.174.184.19
Target Fix4.23
Fix Commit5631857
Main Commit6835252
CreatedAug 15, 2017
ResolvedMar 28, 2019
UpdatedJun 4, 2019