---
title: "agentDidUpdate(_:)"
framework: gameplaykit
role: symbol
role_heading: Instance Method
path: "gameplaykit/gkagentdelegate/agentdidupdate(_:)"
---

# agentDidUpdate(_:)

Tells the delegate that an agent has just performed a simulation step.

## Declaration

```swift
optional func agentDidUpdate(_ agent: GKAgent)
```

## Parameters

- `agent`: The agent object that has just performed a simulation step.

## Discussion

Discussion Implement this method when you want to update a display based on the latest data from the agent simulation. Read the position and rotation properties of the agent (as a GKAgent2D or GKAgent3D object), then set the corresponding attributes of the object that provides the agent’s visual representation.

## See Also

### Synchronizing with Agents

- [agentWillUpdate(_:)](gameplaykit/gkagentdelegate/agentwillupdate(_:).md)
