Cause and mechanism
A ScriptableObject can store settings in an .asset file. If an Editor tool changes its values without marking the asset as modified (dirty) and saving it correctly, those changes may disappear after restarting. Record Undo and save the asset. This is an Editor workflow, not a way to save runtime changes into an .asset in a built game.
Check and correct the setup
- Use serialized properties for inspectors, or appropriate undo/dirty handling for direct changes.
Follow input, processing / condition, then output - Save batch edits at a safe time, avoiding serialization/import reentrancy.
Follow input, processing / condition, then output - Use an explicit save system for player data. Check effects of modifying shared assets during Play Mode.
Follow input, processing / condition, then output
Limits and verification
Keep Editor code out of runtime assemblies and reopen the project to verify persistence.
A focused diagnostic setup
Use a test ScriptableObject with one value, separating Edit-mode asset editing from Player save data and temporary runtime copies.
Test in this order
- Identify the actual Project asset versus any instantiated copy.
Follow input, processing / condition, then output - Verify serialized Apply or direct-edit Undo/dirty handling, then save at a safe Editor point.
Follow input, processing / condition, then output - Deselect, reopen and restart the Editor to test persistence.
Follow input, processing / condition, then output
Interpret the result
Extra Save calls do not turn a temporary-copy change into the intended asset edit. Player progression needs its own persistence mechanism rather than Editor .asset saving.