API reference
API reference
Select your platform
No SDKs available
No versions available

CandidateComparer Class

Extends MonoBehaviour, ICandidateComparer

Member Functions

Compares two candidate objects to determine their relative priority.
The implementation should be consistent with the standard comparison contract:
  • If Compare(x,y) returns negative, then Compare(y,x) should return positive
  • If Compare(x,y) returns zero, then Compare(y,x) should return zero
  • If Compare(x,y) returns positive, then Compare(y,x) should return negative
Parameters
a
The first candidate object to compare
b
The second candidate object to compare
Returns
A negative value if a should be prioritized over b, zero if they have equal priority, or a positive value if b should be prioritized over a
abstract int Compare
( T a,
T b )
Did you find this page helpful?
Thumbs up icon
Thumbs down icon