---
title: "update(_:for:)"
framework: spritekit
role: symbol
role_heading: Instance Method
path: "spritekit/skscenedelegate/update(_:for:)"
---

# update(_:for:)

Tells you to perform any app specific logic to update your scene.

## Declaration

```swift
optional func update(_ currentTime: TimeInterval, for scene: SKScene)
```

## Parameters

- `currentTime`: The current system time.
- `scene`: The scene that is being animated.

## Mentioned in

Detecting Changes at Each Step of an Animation Disconnecting Bodies from Joints Use SpriteKit Objects within Scene Delegate Callbacks

## Discussion

Discussion Do not call this method directly; it is called by the system exactly once per frame, so long as the scene is presented in a view and is not paused. This is the first method called when animating the scene, before any actions are evaluated and before any physics are simulated.

## See Also

### Handling Animation Events

- [Use SpriteKit Objects within Scene Delegate Callbacks](spritekit/use-spritekit-objects-within-scene-delegate-callbacks.md)
- [didEvaluateActions(for:)](spritekit/skscenedelegate/didevaluateactions(for:).md)
- [didSimulatePhysics(for:)](spritekit/skscenedelegate/didsimulatephysics(for:).md)
- [didApplyConstraints(for:)](spritekit/skscenedelegate/didapplyconstraints(for:).md)
- [didFinishUpdate(for:)](spritekit/skscenedelegate/didfinishupdate(for:).md)
