ShowIf/HideIf attribute breaks ability to select an object

Issue #799 on hold
Кирилл Небыльцов created an issue
  1. Object selection is kinda broken when using the ShowIf, HideIf, etc.. attributes
  2. Use the code below, create the scriptable object and try to assign a sprite by sequentially clicking on several of them

    ``` using Sirenix.OdinInspector; using UnityEngine;

    [CreateAssetMenu(fileName = "New Test SO", menuName = "Test/New Test SO", order = 1)] public class TestSO : ScriptableObject { [ShowIf("@this.someSprite != null")] public string someField; public Sprite someSprite; } ```

  3. I added a video file which illustrates the problem

  4. Unity 2020.3.18
  5. Odin 3.0.8.0
  6. Editor Only mode is not enabled
  7. Windows 10 Pro x64

Comments (3)

  1. Antonio Rafael Antunes Miranda
    • Also happens in 2021.2 with Odin 3.0.9
    • Only seems to happen if you open the object picker and then the state of the ShowIf/HideIf attribute changes. If you open the object picker after the property got hidden or shown it works normally.

  2. Tor Esa Vestergaard

    I'm going to put this on hold, as there is currently no feasible way to fix this given the IMGUI backend Odin currently draws with. Once we move to the retained-state UI Toolkit backend, this issue will go away on its own with no fix required.

  3. Log in to comment