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
- Mono Windows Builds don't produce full log callstacks when generating logs
- AssetBundles fail to load when running in Built Players for Mobile Devices
- UI elements with text gets bigger and grey when Player window is moved to another screen with different resolution
- System name accepts multiline text but crops it on confirmation, duplicates input, and shrinks the field when empty
- UI element scale and position are wrong in project build when DRS is changed with HDR and Software Dynamic Resolution enabled
This is a duplicate of issue #1129424