---
title: "evaluatePredicate(in:)"
framework: gameplaykit
role: symbol
role_heading: Instance Method
path: "gameplaykit/gknspredicaterule/evaluatepredicate(in:)"
---

# evaluatePredicate(in:)

Returns a Boolean value indicating whether the rule’s predicate has been satisfied in the context of the specified rule system.

## Declaration

```swift
func evaluatePredicate(in system: GKRuleSystem) -> Bool
```

## Return Value

Return Value true if the rule is satisfied (and its action should be executed); otherwise, false.

## Discussion

Discussion The GKNSPredicateRule class overrides this method to use its predicate property for testing the rule. Subclasses of GKNSPredicateRule do not need to override this method.

## See Also

### Evaluating a Rule

- [predicate](gameplaykit/gknspredicaterule/predicate.md)
