I guess I could hook a map to the GameInstance. It’s a single player game so it wouldn’t be an issue, although having a giant map amidst other relevant stuff that I need to keep in the GameInstance was something I didn’t really want.
Although I could simplify it using the second suggestion you gave (an actor linked to that level’s notes) but then I’d still need to “send” the notes held by this actor to the game instance once the level ends, since the player would need to keep notes in between levels.
I didn’t want to use an actor for each note because I was thinking of maybe using DataAssets instead. And because I didn’t want many different actors BP_Notes all virtually identical except for the text and maybe sometimes the texture that needs to be displayed.
So all in all I guess I could for:
- Each instance of BP_Note contains a numeric tag, the index of the Notes_DataAssets
- GameInstance holds all the available Notes_DataAssets
- When a BP_Note is found, the GameInstance registers that index of Notes_DataAsset as “found”
- When the WidgetInventory is opened, it requests all the Notes_DataAssets marked as found and displays them
It doesn’t feel very optimized though. I can’t search the map very fast since I need to scroll through each record to find the ones marked as found, and there’s the impracticality of having to define each note in the GameInstance and then use its index in my BP_Note. I avoid replicating the DataAsset between GameInstance and the BP_Notes actor but now the BP_Notes instance isn’t “readable”, I have to go back to the GameInstance every time to know what that BP_Note actually is.