Error after project recompilation in 2022.2 Beta: NullReferenceException: Sirenix.OdinInspector.Editor.BaseMemberPropertyResolver`1[TValue].LazyInitialize ()

Issue #873 new
Alexander Lamar created an issue

1. In 2022.2.0b5, Odin will error out whenever it displays a Vector2 or Vector3 Property in the inspector after opening the project and then recompiling it (after changing an asset, line of code, etc.). The following error occurs repeatedly as long as the inspector on that field is open:

NullReferenceException: Object reference not set to an instance of an object
Sirenix.OdinInspector.Editor.BaseMemberPropertyResolver`1[TValue].LazyInitialize ()

Additionally, new GameObjects are spawned in the scene whenever this error is invoked (see screenshot).

2. To Reproduce:

  • Create a new Unity Project (or use the attached project)
  • Add Odin 3.1.3.0
  • (Optional?) Close and Re-Open the project
  • Open an inspector with a Vector2 or Vector3 Field (I used the Odin Attribute Preview window) - Observe no errors
  • Trigger a project recompilation (Adding a new .cs file, etc)
  • Navigate back to the inspector, observe that the error triggers repeatedly and new objects are created in the scene.

Closing and re-opening the project fixes this issue until the next project recompilation.

3. Screenshot Attached

4. 2022.2.0b5

5. Odin Inspector 3.1.3.0

6. Editor-Only is enabled

7. macOS 12.1

Comments (2)

  1. Log in to comment