---
title: predicate
framework: gameplaykit
role: symbol
role_heading: Instance Property
path: gameplaykit/gknspredicaterule/predicate
---

# predicate

A predicate to be tested when evaluating the rule.

## Declaration

```swift
var predicate: NSPredicate { get }
```

## Discussion

Discussion When the rule is evaluated, GameplayKit tests this predicate against the GKRuleSystem object evaluating the rule.

## See Also

### Evaluating a Rule

- [evaluatePredicate(in:)](gameplaykit/gknspredicaterule/evaluatepredicate(in:).md)
