Conflict between OdinSelector and Required attribute
An ArgumentException is thrown by the editor GUI code when using an OdinSelector to perform a selection for a field that has a Required attribute.
The first time an entry is selected through the Selector nothing happens, the second time the value of the field is changed but the following exception is thrown: ArgumentException: GUILayout: Mismatched LayoutGroup.Repaint
Steps to reproduce the issue:
- Open the SampleScene of the attached sample project
- Select the TestObject GameObject
- Use the ⊙ button to use the selector to assign a value to the MyTypeReference field on the MyTestBehaviour component
- As nothing happened, do the previous step once again
If the Required attribute is removed, no exception is thrown. But for the value of the field to change, the selector still has to be used twice.
Unity versions tested: 2017.3, 2018.1 Editor Only mode is not enabled. OS: Windows 10 Pro
Comments (4)
-
-
- attached re_OdinSelectorBug.zip
-
reporter I'm sorry for the inconvenience, I forgot to remove it before uploading. I hope this didn't cause too much trouble!
-
- changed status to resolved
This appears to be fixed in the beta.
- Log in to comment
I've removed the uploaded file because it contained Odin. We already have Odin ourselves, so there's no reason to send it to us ;)