#safe game reinitialization in runtime to restore state from save

1 messages · Page 1 of 1 (latest)

lavish lichen
#

@mint cedar Yes I looked at CallOrRegister, but I am not sure how is it related with my specific problem. Could you please elaborate ?

lavish lichen
#

I understand how it works, but I think you misunderstood main point of my issue. I would try to clarify it:

  • I am in the middle of the gameplay, game is running, everything is of course initialized
  • at any moment player can open menu and choose to reload game from specific save slot.
  • before restoring state from save I need to be sure that core systems are reinitialized - experience is already loaded, I don't want to restart whole application
  • Any my point is, what is the best approach to do this reinitialization, in the middle of the game. I can reload level - of course, but objects as PlayerState / AbilitySystem etc. would persist so I need to reset them and then apply changes from save
#

Okey, but according to reset itself - do you think manually reinstancing objects like player state is a good idea ? (eg. I'm calling CleanupPlayerState,InitPlayerState in PlayerController) I was just wondering whether this is safe approach or maybe I should call something from high-level api to do safe reset

#

I'm just afraid of invalidate cache issues, just my habits I guess. i'm not sure what standards are in unreal (i am freshly new here, coming from other engine)

#

this is useful tip for me, thanks. This was my dilema

#

(whether to just update existing objects vs reinstance them)