Closed thomas-oconnell closed 1 year ago
Hi, thanks for raising this and figuring out a potential solution. I'm not at work for a few days but I can't see how this would do any harm since it's just adding an additional fallback - even though I don't entirely understand why it works without looking at the code closer. It's probably the timing of when the character is restored vs the level?
I don't believe it will cause any problems, perhaps you could submit it as a pull request, that way you'll get the credit for it 😃 I'll take a closer look and merge it when I'm back in the office.
Cheers Steve
Hello, I hope you're well, and thank you for your fantastic work on this plugin.
I have an Actor Component (
InteractionComponent
) that handles interactions for the player, including holding an object (in this case, a level-placed actor). I store a reference to the held object actor (HeldObjectActorReference
) in theInteractionComponent
. After saving with a held object attached and then reloading,HeldObjectActorReference
would be lost because Level data couldn't be found when working on the actor reference, stored withinInteractionComponent
, stored within the player (at least, this was seemingly what I was running into!).In
SpudPropertyUtil::RestoreContainerProperty
, I changed:To:
This seems to have resolved the issue, and the player retains the actor reference in the component upon reload. I wanted to ask - will this potentially introduce problems elsewhere?
At this time, the
InteractionComponent
is marked withSaveGame
within the player class, as is theHeldObjectActorReference
property inInteractionComponent
.