26. Save the right kind of state
Save Project stores the interface design: images, initial carousel IDs, layout, authored values and scripts. It does not turn every change in a running widget into permanent project data.
| State | Where to keep the durable meaning |
|---|---|
| A discovered gallery picture | A story variable or data collection identifying the image asset. Rebuild the gallery from it when needed. |
| A carried item | The actual character inventory. |
| A settings choice | Boolean, Number or String game variables, plus the intended save/load workflow. |
| A slider handle position | Restore it from the stored numeric value. |
| A radio highlight | Restore the group from the stored stable mode ID. |
| A held/hover image | Temporary visual feedback; do not save it as a permanent choice. |
Game variables and device-wide preferences are not automatically the same thing. Decide whether an option belongs to a particular save slot or should follow the player across games, then use the appropriate persistence workflow.
Test a real save/load sequence. Make choices, apply them, save, change them, load, reopen the menu and restore the controls. Check both the stored values and their visible effects.
A loaded Boolean can be correct while an already constructed Check Box still displays its previous state. That is the reason for the explicit restore steps, not a reason to change the variable type.
