You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Serialization of fields that hide the inherited members of Component (e.g. rigidbody, camera, collider) causes the fields to be displayed five times in the inspector.
It does not matter whether the field is serialized by having SerializeFieldAttribute or public access modifier.
Out of the five fields, the appropriate field is displayed as the second one.
When multiple issue-causing fields are present, the fields are grouped with each other, creating five groups of fields. Fields that behave correctly are displayed in the second group.
Type of the field does not matter; it can be the same, derive other UnityEngine.Object or be a primitive type.
The duplicated fields have the same property path, and so they are synchronized when the value is changed.
The issue does not occur when serializing auto-properties using the SerializeFieldAttribute for the backing field - the field is displayed only once.
Reproduction
In a newly created project, add the Alchemy 1.0.3 package. Then, create a new script with the following contents:
After adding this script to a game object, the inspector will look like this:
Note that the icons of the extraneous fields lack the icon and concrete component name. After changing the selection and reselecting the behaviour again, the icons and appropriate names appear.
Environment
The issue was found and reproduced in the following environment:
Unity 2023.1.16f1 and 2023.2.3f1
Alchemy 1.0.3
The text was updated successfully, but these errors were encountered:
Summary
Serialization of fields that hide the inherited members of
Component
(e.g.rigidbody
,camera
,collider
) causes the fields to be displayed five times in the inspector.SerializeFieldAttribute
orpublic
access modifier.UnityEngine.Object
or be a primitive type.SerializeFieldAttribute
for the backing field - the field is displayed only once.Reproduction
In a newly created project, add the Alchemy 1.0.3 package. Then, create a new script with the following contents:
After adding this script to a game object, the inspector will look like this:
Note that the icons of the extraneous fields lack the icon and concrete component name. After changing the selection and reselecting the behaviour again, the icons and appropriate names appear.
Environment
The issue was found and reproduced in the following environment:
The text was updated successfully, but these errors were encountered: