Search Issue Tracker

By Design

Votes

0

Found in

2019.3

2020.1

2020.1.0a16

Issue ID

1204441

Regression

No

[Serialization] Blue highlight is missing when GameObjects are added in array of MonoBehaviours with SerializedReference objects

Serialization

-

[Serialization] Blue highlight is missing when GameObjects are added in array of MonoBehaviours with SerializedReference objects. Refer the attached video

Steps to reproduce:
1) Open attached project
2) Open MaterialList Scene
3) Make a prefab of MaterialList
4) In Hierarchy, Select MaterialList > Add Cell1, Cell2
5) Assign Materials to them

Expected result: Newly added materials should be highlighted in blue so that the user knows the recent made changes

Actual result: Blue highlight is missing when GameObjects are added in array of MonoBehaviours with SerializedReference objects

Occurring on: 2020.1.0a17, 2020.1.0a16, 2019.3.0f3, 2019.3.0f2

Cannot test beyond 2019.3.0f2 due to the bug https://fogbugz.unity3d.com/f/cases/1196125/ which crashes on making a prefab

Environment: Windows and Mac

  1. Resolution Note (2020.1.X):

    Code uses ObjectField overload that doesn't take a SerializedProperty as parameter; that's why blue margin and other Prefab handling isn't there.

    Replace this line:
    p.objectReferenceValue = EditorGUILayout.ObjectField(p.objectReferenceValue as Material, typeof(Material), false);
    With this:
    EditorGUILayout.ObjectField(p);

    And it works. This is by design.

Add comment

Log in to post comment

All about bugs

View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.