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
- Visible instance buffer returns 0 for every instance when using BatchDrawCommandIndirect on Adreno devices with Vulkan API
- [Android][Vulkan] Native crash in AndroidVulkanVideo::ProcessFrame and AndroidVulkanVideo::Context::~Context() when switching screens
- Screen brightness is not set to a default value when Screen.brightness is set to a negative value
- macOS app window title is not localized when built from generated Xcode project
- Unity Hub doesn't preserve the changed Channel when manually restarting the Hub
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.