Search Issue Tracker
Won't Fix
Votes
0
Found in
2018.2.0a6
2018.3.0a1
2018.3.8f1
2019.1.0a1
2019.2.0a1
Issue ID
1136864
Regression
Yes
EditorGUILayout.PropertyField ignores SerializedProperty selections from a drop-down menu
How to reproduce:
1. Open tester-attached project (SerializedProperty)
2. Open 'SampleScene' scene
3. Select the 'TestClass' GameObject
4. In the Inspector window attempt to select a different 'Collider Mask' or 'Selection' property
Expected result: the selection changes
Actual result: the selection does not change
Reproducible with: 2018.2.0a6, 2018.3.9f1, 2019.1.0b7, 2019.2.0a8
Not reproducible with: 2017.4.23f1, 2018.2.0a5
Notes:
Can be fixed by replacing:
public override void OnInspectorGUI()
{
EditorGUILayout.PropertyField(avoidanceMask, new GUIContent("Collider Mask"));
EditorGUILayout.PropertyField(sel, new GUIContent("Selection"));
}
with:
public override void OnInspectorGUI()
{
serializedObject.Update();
EditorGUILayout.PropertyField(avoidanceMask, new GUIContent("Collider Mask"));
EditorGUILayout.PropertyField(sel, new GUIContent("Selection"));
serializedObject.ApplyModifiedProperties();
}
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
- [Quest] Pitch Shifter causes audio degradation on Quest 2 devices when sped up
- "GUI Error: Invalid GUILayout" and "NullReferenceException" are thrown when adding Scenes to "Scenes in Baking Set" in Adaptive Probe Volumes
- Inspector window not updating when switching GameObjects in Play Mode while having a VR headset connected
- “UnityException: GetInvalidFilenameChars” errors are thrown, and the Overlay Save Preset button becomes unusable when entering Play Mode with a shortcut while Overlay Save Preset window is opened
- "UnityException: GetName can only be called from the main thread." erors are thrown when the Shortcuts window is opened and entering Play Mode with a shortcut
Resolution Note (2019.3.X):
The issue can be fixed by making changes to the script itself, see the description field for the working script