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
- Unity CIL Linker fails on Player build when persistent listeners have "<" and ">" in their XML attribute names
- ”Lighting data asset ‘LightingData’ is incompatible with the current Unity version…” warnings are thrown when saving Indoors (URP) and Outdoors (URP) Scenes as Scene Templates
- [iOS] The screen blinks when transitioning from custom to Unity splash screen
- [macOS] ”Ignoring depth surface load action as it is memoryless” warnings are thrown when taking Game View Snapshot
- UI Builder Inspector scrolls back up when changes on an expanded but not fully displayed Inspector tab are saved
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.