Save Reader
5_ScriptableSave
Last updated
5_ScriptableSave
Last updated
Let's select the Save Reader in the hierarchy and inspect its code. This code is responsible for displaying the content of the save in the UI.
In Awake(), you can see that we register to all the callbacks provided by the Scriptable Save: OnSaved, OnLoaded, and OnDeleted. We want to update the text whenever the save performs an operation.
Note that if the load mode is set to automatic, Awake() will be called after the save has already been loaded. Therefore, we need to force RefreshText(). To display the save content, simply access the LastJsonString property: