Search Issue Tracker
Fixed
Votes
0
Found in
5.3.4f1
Issue ID
803520
Regression
No
After commenting FormerlySerializedAs attribute variable's value is changing to 0 only after building the project
Reproduction steps:
1) Open user's attached project
2) Select "Test prefab" prefab in Project window then change "Test variable" value inside inspector to any other (for example 64)
3) Open "TestScript" script and change "testVariable" viarble's name to any other (for example "newName")
4) Uncomment "[UnityEngine.Serialization.FormerlySerializedAs("testVariable")]" attribute
5) Go back to Unity
6) Go to the "TestScript" script and comment "[UnityEngine.Serialization.FormerlySerializedAs("testVariable")]" attribute
7) Go back to Unity and notice that "New name" value in prefab has not changed.
8) Build project for any platform and go back to Unity
Actual result:
"New name" value has changed to 0
Expected result:
"New name" value has to remain same as before building project OR should change to 0 right after commenting "[UnityEngine.Serialization.FormerlySerializedAs("testVariable")]" attribute
All about bugs
View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.
Latest issues
- Memory leak when a lot of UI elements are spawned and despawned
- Warnings are not logged in the Console window when using external code analyzers
- Errors “TLS Allocator ALLOC_TEMP_TLS, underlying allocator ALLOC_TEMP_MAIN has unfreed allocations, size 288“ appear constantly when Prefab is open
- Crash on PPtr<Shader>::operator or NullException errors spammed in console when calling Dispose() on null GraphicsBuffer with baked Reflection Probes
- “EndRenderPass: Not inside a Renderpass” and other Render Graph errors in the Player when Render Graph is enabled and Overlay UI is used
Add comment