Description

EditInlineNew objects added to Instanced array stored in a struct are seemingly ignored and the object is instead parented to the CDO of the owner.

The owner must be the BP child of a parent BP that inherits from a C++ with a reference one or many of the structs containing the Instanced array.

Steps to Reproduce

1. Create a class that inherits from UObject and overrides GetWorld
2. Add DefaultToInstance and EditInlineNew to the UCLASS specifiers
3. Add a function that calls GetWorld
4. Create a struct that contains a TArray of TObjectPtrs to the aforementioned class
5. Mark this array as Instanced, EditDefaultsOnly/EditAnywhere
6. Add a function to the struct that calls the function added to the EditInlineNew class for each entry in the array.
7. Create a class that inherits from Actor and add an array of the previously created structs.
8. Add a function to call the previously created struct's function.
9. In editor, create a BP of the type of the class that inherited from AActor.
10. Populate the array of Instanced EditInlineNew objects in the parent.
11. Create a child BP of the parent BP.
12. Spawning and calling the native function on the parent BP results in GetWorld succeeding on each EditInlineNew object, while calling the same function on a spawned child BP results in GetWorld failing as each instance of the object has the ChildBP's CDO as an outer.

Have Comments or More Details?

There's no existing public thread on this issue, so head over to Questions & Answers just mention UE-210277 in the post.

3
Login to Vote

Unresolved
ComponentUE - Gameplay - Blueprint Runtime
Affects Versions5.3.2
Target Fix5.6
CreatedMar 21, 2024
UpdatedOct 1, 2024
View Jira Issue