Object Comparator

Compares 2 objects (derived from UnityEngine.Object) with certain comparator.
Comparison against None (Object) means comparing against null object.
Inputs
- A: First object.
- Comparator: The comparator to use.
- Equals
- Not Equals
- B: Second object.
- Destroyed Means Null: If unchecked, then reference comparison will be done using
ReferenceEqualsinstead of==operator. ReferenceEquals againstnullreturnstrueeven if the object is destroyed, and only returnsfalseif the reference is trulynull. Although it's safer to treat destroyed object asnull, but please also note that using==operator onUnityEngine.Objecthas more performance cost as described in Unity's General Optimizations.
Outputs
- Out: The boolean result whether it matches the comparator condition or not.