Unity Issue Tracker - Data is not serialized correctly on time when OnValidate is used to retrieve the data
Closed
UUM-70610
Data is not serialized correctly on time when OnValidate is used to retrieve the data
Unity: Serialization
Won't Fix
6.0.X
2023.2.X
2022.3.X
Cancelling this 2023.2 tech release issue since the support for this release has come to end of life. Cancelling this 2023.2 port case does not affect any LTS or Unity 6 Beta/Preview that remain open.
How to reproduce:
1. Open the “ScriptableSaveBug.zip“ project
2. Observe the Console
Expected result: The serialized data value is the same as the expected value
Actual result: The serialized data has the value of the previous state
Reproducible in: 2022.3.24f1, 2023.2.18f1, 6000.0.0b14
Could not test in: 2021.3.37f1 (Unsolvable script compilation errors)
Reproduced on: Windows 11 Pro (23H2)
Not reproduced on: No other environment tested
Notes:
To reproduce the issue the second time, the “Value: “ in the “Test Scriptable Object.asset“ Asset has to be changed to 0 before opening the project
Workaround is to change the “Value: “ in the “Test Scriptable Object.asset“ Asset to 1 before opening the project
Prioritise and Follow this issue
Have a workaround or additional info about this issue?