Search Issue Tracker
Duplicate
Votes
9
Found in
2018.4
2019.4.2f1
2020.2
Issue ID
1263387
Regression
No
Adding a public variable to a MonoBehaviour that is attached to a Prefab and changing its value doesn't show overrides
How to reproduce:
1. Open the attached project "bugExample.zip"
2. Open "SampleScene" Scene
3. Click on "GameObject" GameObject in the Hierarchy window and observe the "X" value in the Inspector window
4. Click on "GameObject" Prefab in the Project window and observe the "X" value in the Inspector window
5. Click on Open Prefab in the Inspector window and observe the "X" value
6. In the Project window, open the "test" script and change "x" value to anything else
7. Repeat steps 2-5
Expected result: old X value remains in the Inspector window but is highlighted, indicating that it's overridden
Actual result: old X value remains in the Inspector window and it is not highlighted, but if the Prefab is opened, the changed value can be seen
Reproducible with: 2018.4.26f1, 2019.4.8f1, 2020.1.2f1, 2020.2.0a20
Notes: To repro on a new project, add an empty script to a GameObject, and create a prefab. Then add a new variable, save the script, change the value of the variable, and save again. This only reproduces if a new variable is introduced to an existing prefab.
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
- [URP] Invalid update of shader stripping settings
- [HDRP] Errors on Shader stripper that do not stripp shaders.
- Usage of Adaptive Probe Volumes throws a lot of IndexOutOfRangeException and Assertion Failed errors
- Prefab overrides don't recover missing managed references
- Trail Renderer visual doesn't match the positions of vertices when they have been offset
This is a duplicate of issue #1129424