UObject inside editor asset is null in standalone

I am making a custom editor plugin and have a custom asset called UQuestAsset that can be created in the content browser. I can create new quests inside the browser and they work fine.

My issue is that inside the UQuestAsset I have a property:

UQuest* Quest;

When I run a PIE session the Quest pointer is valid and works great. The problem is that in standalone/packaged, the Quest pointer is null and cannot be used. It appears that it doesn’t get saved when I run the game in standalone. All the other UPROPERTY()'s in the asset get saved, i’m assuming the issue is because UQuest is a UObject.

I need some way of saving the Quest object inside my Quest Asset class so that it stays valid and can be used in a packaged game.

Does anyone know how to do this? Thank you for your time!

Still looking for help on this

UObject should be saved with asset. How, where and when do you create Quest object?

I have found the answer!

UObjects do get saved with the asset. My problem was that when I created my UObject using NewObject(), I forgot to set the Quest Asset as the Outer, so the UObject was ignored.

Once I passed in my asset as the Outer, the UObject saved perfectly.