Search Issue Tracker

By Design

Votes

0

Found in

2021.3.29f1

2022.3.6f1

2023.1.6f1

2023.2.0b2

Issue ID

UUM-44730

Regression

No

IInterface variables aren't shown in the Inspector when serializing

-

How to reproduce:
1. Open the attached “SerializeBug.zip“ project
2. Open the “SampleScene“ Scene
3. Select the “GameObject“ GameObject in the Hierarchy
4. Observe the “Example1“ and “Example2“ Scripts in the Inspector

Expected result: The IInterface variable is shown in the Script Components
Actual result: The IInterface variable isn’t shown in the Script Components

Reproducible with: 2021.3.29f1, 2022.3.6f1, 2023.1.6f1, 2023.2.0b2

Reproduced on: macOS 13.4.1 (Intel), Windows 10 (by reporter)

Note: The user reported that a class with a private interface field with a serialized reference attribute will be shown in the Inspector, but it wasn’t showing when testing the issue

  1. Resolution Note:

    Currently choosing a specific implementation for a SerializeReference interface fields in the inspector is not supported. To achieve this users will need to implement custom editors for these types.

    It is however confusing that user could select implementation for Example1 as shown in the screenshot, as it shouldn't have been possible and we were not able to reproduce it. If this is the case, please feel free to reopen the bug for further investigation. In doing so, please provide more details such as the Unity version used, information whether any custom editor or packages were used.

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.