Version: Unity 6.7 Alpha (6000.7)
LanguageEnglish
  • C#

ConditionComparison

enumeration

Suggest a change

Success!

Thank you for helping us improve the quality of Unity Documentation. Although we cannot accept all submissions, we do read each suggested change from our users and will make updates where applicable.

Close

Submission failed

For some reason your suggested change could not be submitted. Please <a>try again</a> in a few minutes. And thank you for taking the time to help us improve the quality of Unity Documentation.

Close

Cancel

Description

Specifies the comparison operator used by a condition to compare a value against the condition's reference value.

A condition records the operator and the reference value; it does not evaluate them. The consuming runtime performs the comparison. Ordering operators such as ConditionComparison.Less only apply to values whose type supports ordering, such as numeric types; other types support ConditionComparison.Equal and ConditionComparison.NotEqual only.

Properties

Property Description
Equal The value equals the reference value.
NotEqual The value does not equal the reference value.
Less The value is less than the reference value.
LessOrEqual The value is less than or equal to the reference value.
Greater The value is greater than the reference value.
GreaterOrEqual The value is greater than or equal to the reference value.