Search Issue Tracker
By Design
Votes
0
Found in
2020.3.39f1
2021.3.10f1
2022.1.16f1
2022.2.0b7
2023.1.0a10
Issue ID
UUM-13730
Regression
No
ScriptableObject data not persistent across scenes when ScriptableObject Asset is not selected
Steps to reproduce:
# Open attached project "scriptableObject.zip" and scene "Main"
# Enter Play Mode
# In Game View, press the "Enter Town 1" button, then the "Enter" button
# Observe Console window, and Assets -> Resources -> TownData ScriptableObject
# Exit Play Mode
# In Project window, select Assets -> Resources -> TownData ScriptableObject. Keep it selected for the remainder of the repro
# Repeats steps 2-4
Expected results:
TownData ScriptableObject has four PersistentBuildingData objects, Console logs "Total towns in scriptable object: 4" in both scenarios
Actual results:
TownData ScriptableObject has correct data only when the Asset itself is selected. Otherwise, upon switching scenes, 0 objects are kept
Reproducible with: 2020.3.39f1, 2021.3.10f1, 2022.1.16f1, 2022.2.0b7, 2023.1.0a10
Reproduced on: Windows 10
Add comment
All about bugs
View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.
Latest issues
- Licensing Client fails to launch when opening Unity Hub
- Sprite Atlas Inspector preview disappears when entering Play mode unless SpriteAtlasMode is set to "Sprite Atlas V2 - Enabled"
- Opening reference for Audio Importer opens missing page
- [Android] SpriteAtlas gets corrupted in Player when using Late binding with SRP Batcher enabled
- Build fails with compiler errors when switching scripts GUIDs
Resolution Note:
This works as intended.
Changes are not persisted during play mode. So changes happening to ScriptableObjects will only be applied to memory. But because the ScriptableObject is selected, the memory is kept around across entering/exiting playmode but never persisted to disk.