Search Issue Tracker
By Design
By Design in 2023.1.X
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
- Performance Markers Search window shows an empty entry in the list
- Enabling Deep Profiling in Performance Markers Search window breaks Inspector panel buttons when navigating through the marker items
- Dragging selector from selector row background shows preview but does not apply class in UI Builder
- An "InvalidOperationException" error is thrown when TryRemoveItem is used with rebuildTree set to false
- Build fails with IL2CPP error when building on Android platform in a specific project
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.
Resolution Note (2023.1.X):
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.