VariableComparison bug

If I add a VariableComparison with a condition such as BranchNode and then compare Vector2 in Blackboard with Vector2 in the input field with NotEquals, it does not compare well, is this a bug?

Personally, I think that the comparison target of NotEquals in ConditionUtils#CompareReferences is “left ! = null” is not correct.

Sorry if this has already been reported or if I am mistaken.

Behavior version is 1.0.7

UPDATE:
I thought “Equal” would work, but it doesn’t seem to work…
It may be a problem to proceed to CompareReferences because IComparable is not implemented in Vector2.

I’m not sure of the context in Behaviors and Blackboards, but generally a Vector2 cannot be null, so it cannot be usefully compared to null, as it can never be null.

Usually one checks Vector2s to be equal to something.

If you really need a null, you can use a Vector2? nullable wrapper (assuming the toolchain supports it; I don’t think Unity does…), or make a special sentinel value you know you will never normally use, perhaps new Vector2( 1024,1024); for instance, and compare it to that, or else just use Vector2.zero as your null.

It all comes down to what kind of semantics you’re attaching to the concept of being null.

Thanks a lot.

I am using a translation tool so it is possible that I am not conveying the intent well. Please understand.

What I was trying to do was not to compare Vector2 and null,
Vector2(Blackboard) and Vector2 input value (0,0).

The standard VariableComparison may not be able to compare Vector2, etc.
However, I thought that as long as VariableComparison can use Vector2, it should also be able to compare.