ShowIf string comparison not working in 2.0.0 as it was in Odin 1.0.6

Issue #389 resolved
Richard Baxter
created an issue

The ShowIf attribute seems to not work if comparing strings. Using Unity 5.6.6f2

This was working in 1.0.6.x but seems to not work in


  • Fresh project in Unity 5.6.6f2
  • Import Odin from the Asset Store
  • Create C# script "OdinTest"
using Sirenix.OdinInspector;
using UnityEngine;

public class OdinTest : MonoBehaviour
    private string comparisonString = "this is the value";

    [ShowIf("comparisonString", "this is the value")]
    private bool shouldBeVisible;
    // this shows in inspector as expected

    [ShowIf("comparisonString", "this is some other value")]
    private bool shouldNotBeVisible;
    // this also shows in inspector whereas in Odin 1.06 it would not (and I'd expect it to not

  • Create an object with OdinTest
  • Both fields are visible in inspector Odin Bug.PNG

Comments (3)

  1. Log in to comment