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
- Can’t delete gradient keys with Mac keyboard or context menu options
- Editor freezes for a few minutes when closing or switching a VFX window that was opened in a previous project
- UI Overlaps when switching Render Pipeline Asset for different Quality Levels in Quality Project Settings
- Ray Tracing Shader link to the documentation isn’t working
- Warning "BatchRendererGroups currently don't support override shaders" is spammed in Play mode when using H-Trace WSGI with BatchRenderGroups
This is a duplicate of issue #1129424