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
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
- Warnings in the Bug Reporter window are cut off and not truncated when the Bug Reporter window is resized to its minimum size
- Color is incorrectly applied to objects when initialized with non-normalized parameters
- SerializationUtility.GetManagedReferencesWithMissingTypes() don't return null when “Prefab has missing SerializeReference Types“ warning banner is present
- Memory leak when VFX Graph is open and Camera has "Target Texture" enabled
- The Canvas component's warning box is missing an apostrophe when Additional Shader Channels is set to "Normal" and "Tangent" with Render Mode set to "Screen Space - Overlay"
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.