---
title: "update(context:)"
framework: realitykit
role: symbol
role_heading: Instance Method
path: "realitykit/system/update(context:)"
---

# update(context:)

Updates entities up to once every scene update.

## Declaration

```swift
@MainActor @preconcurrency mutating func update(context: SceneUpdateContext)
```

## Parameters

- `context`: The scene context for the scene to update.

## Mentioned in

Implementing systems for entities in a scene

## Discussion

Discussion RealityKit calls this method on all registered systems, as often as the updatingSystemWhen parameter of entities(matching:updatingSystemWhen:) defines. The context parameter contains a reference to the scene that the System is updating, along with the elapsed time since RealityKit last called the update method for the same scene. Use entities(matching:updatingSystemWhen:) inside this method for the most optimized way to find the matching entities for this System.

## See Also

### Implementing system logic

- [SceneUpdateContext](realitykit/sceneupdatecontext.md)
- [EntityQuery](realitykit/entityquery.md)
- [QueryPredicate](realitykit/querypredicate.md)
- [QueryResult](realitykit/queryresult.md)
