Hi there,
I am trying to use ArrayContains to check null reference in an array of objects (AudioClip), I leave some fields in the array unsigned and leave the Value filed in the action inspector empty, but I found it will always return not contained event.
Adding debug line in the ArrayContains action gives me this:
// output "null" in console
Debug.Log(value.GetValue());
// output "Null" in console
Debug.Log(array.Values[0]);
Note that case difference in two Null/null?
Then I try compare them to null:
// output "False" in console
Debug.Log(value.GetValue() == null);
// output "True" in console
Debug.Log(array.Values[0] == null);
Dig in further:
// output "UnityEngine.Object" in console
Debug.Log(value.GetValue().GetType());
// throws NullReferenceException
Debug.Log(array.Values[0].GetType());
SO I guess FsmVar internal did something with empty/null data and basically it is not possible to use ArrayContains to check null element.