(1): So the database is read-only in all instances and upon starting the game a runtime copy gets loaded in for Lua to process, and then any changes made to the Lua runtime copy are lost when the game quits?
(2): Related to this, I have a variety of player stats, items, etc. which are contained within Unity C# data structures currently. I wish to use these for various conditions and scripts within dialogue in the conversations manager - must they therefore be set for the database manager using 'DialogueLua.SetVariable'?
(3) Finally, and kind of the most important point, does the following make sense as an order of operations whenever the game restarts from a save file?
- When we load in from save data all relevant values are loaded in from serialisation to the actual Unity game data
- A script on Start or Awake assigns any relevant values for the dialogue database via DialogueLua.Set...
- Then if a variable changes in the C# data during runtime, it is set again in the database via DialogueLua.Set...
- When the game is saved the data is serialised using the save system but this does NOT affect the actual databse itself since it is read only. Hence, this process must be repeated whenever the game is re-loaded.