-
-
Notifications
You must be signed in to change notification settings - Fork 21
Closed
Description
Description
Given an array of: { raw, Object, Object, raw }. Right-clicking on element [0] and choosing "Clear" or "Properties" will clear show the property of the last element. [3]
Doing the same thing on element [1] will apply to element [2] since it is the last element of its type.
This is caused by the fact that drawers are reused and the GenericMenu events are processed late in Unity's loop
This is also true for everything related to CustomObjectDrawer. When ReferenceDrawer.OnButtonClicked is called, the Property.propertyPath is always the last element of the same type (raw or Object).
Demo:
Given
public class CodeExample : MonoBehaviour, IDog
{
public List<SerializableInterface<IDog>> dogs;
}
[Serializable]
public class Dog : IDog
{
public int Age;
public string Name;
}
public interface IDog { }
Metadata
Metadata
Assignees
Labels
No labels