Conflict between OdinSelector and Required attribute

Issue #333 resolved
Alessandro Salvi created an issue

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)

  1. mSkull001

    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 ;)

  2. Alessandro Salvi reporter

    I'm sorry for the inconvenience, I forgot to remove it before uploading. I hope this didn't cause too much trouble!

  3. Log in to comment