sinbad / SPUD

Steve's Persistent Unreal Data library
MIT License
300 stars 44 forks source link

Fix null parent Level for Actor references nested in components #55

Closed thomas-oconnell closed 1 year ago

thomas-oconnell commented 1 year ago

When storing a reference to an actor within an actor component, that reference was lost upon reload because Level within SpudPropertyUtil::RestoreContainerProperty remained nullptr (seemingly).

With the attached fix, along with the actor component and actor reference both marked as SaveGame, the nested actor reference loads properly.

I'm not sure if this only affects level-placed actors whose reference was stored during play (and not during construction/initialization), but that was the condition I've tested.

sinbad commented 1 year ago

Thank you!