When you call GetOuter() inside AssetUserData::PostEditChangeOwner, the Outer that is returned, is marked as "Trash". This is because the object is constructed again when an AssetUserData is added. This does not happen inside the Blueprint, only with instances inside a level.
This is not the expected behaviour, as there is no way to get the owning actor of the AssetUserData. This behaviour has been tested from version 5.1 up to 5.5.
Without the repro project:
1- Create a AssetUserData class.
2- Override the PostEditChangeOwner and add the following code: UObject* Outer = GetOuter(); Add a breakpoint to it.
3- Create a Blueprint actor with a static mesh component and add it to the level.
4- Inside the Mesh Component, add the Asset User Data you created.
5- Check the value of the Outer and you will see that has the "Trash" name added to it.
There's no existing public thread on this issue, so head over to Questions & Answers just mention UE-230987 in the post.
0 |
Component | UE - Gameplay |
---|---|
Affects Versions | 5.5 |
Created | Nov 20, 2024 |
---|---|
Updated | Nov 20, 2024 |