- Home /
UnityEvent Inspector bug at Unity 2020.3
Greetings, everyone and thank you for your time.
I have experienced that Unity has a bug related to UnityEvents at 2020.3 (at least 2020.3.1f1 and 2020.3.14f1). The bug is about Unity's default inspector being unable to correctly draw UnityEvents of a class or struct A that is contained inside a list or array in a list B. Here I post some of my tests about this behaviour.
This is the correct UnityEvent inspector (Top) VS this is how it is displaying (Bottom)
Also the console prompts this error message:
type is not a enum value UnityEditor.SerializedProperty:get_enumValueIndex () UnityEditorInternal.UnityEventDrawer:GetMode (UnityEditor.SerializedProperty) UnityEditorInternal.UnityEventDrawer:DrawEvent (UnityEngine.Rect,int,bool,bool) UnityEditorInternal.ReorderableList:DoListElements (UnityEngine.Rect,UnityEngine.Rect) UnityEditorInternal.ReorderableList:DoList (UnityEngine.Rect,UnityEngine.Rect) UnityEditorInternal.ReorderableList:DoList (UnityEngine.Rect) UnityEditorInternal.UnityEventDrawer:OnGUI (UnityEngine.Rect) UnityEditorInternal.UnityEventDrawer:OnGUI (UnityEngine.Rect,UnityEditor.SerializedProperty,UnityEngine.GUIContent) UnityEditor.PropertyHandler:OnGUI (UnityEngine.Rect,UnityEditor.SerializedProperty,UnityEngine.GUIContent,bool) UnityEditorInternal.ReorderableList/Defaults:DrawElement (UnityEngine.Rect,UnityEditor.SerializedProperty,object,bool,bool,bool,bool) UnityEditorInternal.ReorderableList:DoListElements (UnityEngine.Rect,UnityEngine.Rect) UnityEditorInternal.ReorderableList:DoList (UnityEngine.Rect,UnityEngine.Rect) UnityEditorInternal.ReorderableListWrapper:Draw (UnityEngine.GUIContent,UnityEngine.Rect,UnityEngine.Rect,bool) UnityEngine.GUIUtility:ProcessEvent (int,intptr,bool&)
This is the code I used to generate this issue
These are the steps for the issue to happen:
Open a default inspector tab of the script "Test".
Select a B Object on the inspector (doesn't matter if the single B or a listed one) .
Create an A Object on the list/array of the B Object.
Initialize the A Object (in the list/array) event. This is when the issue happens.
Thank you for your time.
Regards.
Your answer
Follow this Question
Related Questions
Unity inspector field overlap with eachother 1 Answer
Sprites are being cut in half. HELP! 4 Answers
Smooth Crouch Movement Issue 0 Answers
Undo not properly working for some Rigidbody properties 0 Answers
Child object consistency issue 1 Answer