- edited description
ShowIf/HideIf attribute breaks ability to select an object
Issue #799
on hold
- Object selection is kinda broken when using the ShowIf, HideIf, etc.. attributes
-
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; } ```
-
I added a video file which illustrates the problem
- Unity 2020.3.18
- Odin 3.0.8.0
- Editor Only mode is not enabled
- Windows 10 Pro x64
Comments (3)
-
reporter -
-
assigned issue to
- marked as minor
- 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.
-
assigned issue to
-
- changed status to on hold
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.
- Log in to comment