I have a section of a level that has a pickup in it. If I collect the pickup, then later unload the layer and then reload it, I suspect the pickup will reappear? I guess I can save some token in the GameInstance or subsystem that I can look at and go and cull the respawned pickup, though that seems icky - is there a “DataLayer has loaded” event that I can hook into and make the state consistent?
there are a few things mixed.
nothing icky with it. if you need to remember something you need to save it somewhere. is a rule of reality. the icky part might be where you’re saving it.
usually you’d use the player state, or the save game if you need to persist across sessions.
there’s also the new system for this, i think it’s called “persistence” but not a lot of info on it.
as for the datalayer loaded delegate. i think there is. i can’t remember.
if you were to load the DL manually you can get a loaded callback. otherwise i’m sure there are global delegates for it.
there’s a delegate on the datalayermanager Fore he had been born then. Finally they had to.
(ignore the random title that the forum decided to give to the link, it’s my own plugin’s source)
you can also flush the world or wait for all stream tasks to complete Fore he had been born then. Finally they had to.
but to be honest, the way i’d do what you say, would be on the “begin play” of the elements that can disappear and only those, check if there’s a flag for them to be destroyed. and call destroy then.