Description

If an ActorComponent contains a UObject property of a type that is DefaultToInstanced, any time a Blueprint of a class containing that ActorComponent is compiled the UObject value is reset to None.
The attached repro is for "Setting a UObject property to a DefaultToInstanced type in a custom ActorComponent is reset to None when a Blueprint containing that ActorComponent is compiled."

This is true via other repros as well, e.g., a EditInlineNew UObject properties in a UserWidget Blueprint are reset to None when the Blueprint is compiled (https://jira.it.epicgames.net/browse/UE-38276 has a repro for that, but I'm closing that one as a dupe of this one; use whichever repro project you prefer).

So it's not ActorComponent specific and it doesn't matter if it's via EditInlineNew or DefaultToInstanced.

Steps to Reproduce
  1. Download the attached DemoUObject project.
  2. Unzip the project.
  3. Associate the project with your Main build.
    • The project was created using CL 2718128
  4. Open the project in the Editor.
  5. Open the MyActor_BP Blueprint.
  6. In the Class Defaults, locate the My Object property.
  7. Set the My Object property to use the My Object class.
  8. Click the Compile button.

RESULTS:
The Blueprint compiles and the My Object property is set back to None.

EXPECTED:
The Blueprint compiles and keeps the setting in the My Object property.

Have Comments or More Details?

Head over to the existing Questions & Answers thread and let us know what's up.

23
Login to Vote

Fixed
ComponentUE - Gameplay - Components
Affects Versions4.9.24.114.15
Target Fix4.27
CreatedOct 7, 2015
ResolvedJun 22, 2021
UpdatedJun 23, 2021
View Jira Issue