Search Issue Tracker
Fixed in 2020.2.X
Fixed in 2019.3.X, 2020.1.X
Prefabs lose their values if scripts are removed then reintroduced
1. Create a Monobehaviour Foo with a single int field
2. Create an empty object in the scene and add the Foo behavior to the object
3. Set the components field to 12
4. Create a Prefab from the object
5. Close the Editor
6. Move the Script to a folder outside the project
7. Delete the library folder
8. Open the project in the editor
9. Select the Prefab in the Project view
10. Notice the Inspector says "Prefab is missing script"
11. Copy the Script into the project (and refresh, if autorefresh is disabled)
12. Select the prefab and see the field value
Expected result: The field value is '12'
Actual result: The field value is '0'
Reproducible in: 2018.4.10f1, 2019.2.7f2, 2019.3.0b5, 2020.1.0a6
Note: Reimporting the Prefab will fix the issue
All about bugs
View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.
- [Linux][OpenGL][Vulkan] Draw calls are not shown in the Event List when taking a capture of a frame with RenderDoc
- Inaccurate collision detections when Rigidbody Collision Detection is set to "Continuous" or "Continuous Dynamic"
- Crash on Object::IncrementPersistentDirtyIndex when upgrading project version
- [iOS] Multiple Xcode project instances created before opens up when performing Build and Run for iOS Platform
- IL2CPP Player crash on memset in VCRUNTIME140D when selecting UI GameObject