<!--
{
  "availability" : [
    "iOS: 9.0.0 -",
    "iPadOS: 9.0.0 -",
    "macCatalyst: 13.1.0 -",
    "macOS: 10.11.0 -",
    "tvOS: 9.0.0 -",
    "visionOS: 1.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "GameplayKit",
  "identifier" : "/documentation/GameplayKit/GKEntity/update(deltaTime:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "GameplayKit"
    ],
    "preciseIdentifier" : "c:objc(cs)GKEntity(im)updateWithDeltaTime:"
  },
  "title" : "update(deltaTime:)"
}
-->

# update(deltaTime:)

Performs periodic updates for each of the entity’s components.

```
func update(deltaTime seconds: TimeInterval)
```

## Parameters

`seconds`

The time step to use for any time-dependent actions performed by this method (typically, the elapsed time since the previous call to this method).

## Discussion

At runtime, an entity/component-based game needs to dispatch periodic logic—from an update/render loop method such as <doc://com.apple.documentation/documentation/SpriteKit/SKScene/update(_:)> (SpriteKit) or <doc://com.apple.documentation/documentation/SceneKit/SCNSceneRendererDelegate/renderer(_:updateAtTime:)> (SceneKit), or a <doc://com.apple.documentation/documentation/QuartzCore/CADisplayLink> (iOS) or <doc://com.apple.documentation/documentation/CoreVideo/CVDisplayLink> (macOS) timer in a custom rendering engine—to each of its components, so that each can perform component-specific update logic.

The [`GKEntity`](/documentation/GameplayKit/GKEntity) [`update(deltaTime:)`](/documentation/GameplayKit/GKEntity/update(deltaTime:)) method is one of the two options GameplayKit provides for dispatching updates—this option is easy to implement in games with small numbers of entities and components. Call this method for each entity in your game, and each entity will in turn call the [`update(deltaTime:)`](/documentation/GameplayKit/GKComponent/update(deltaTime:)) method for each of its components.

The other option is to dispatch updates per-component, rather than per-entity, using a [`GKComponentSystem`](/documentation/GameplayKit/GKComponentSystem) object. Using a component system allows you to update all components of a specific component class in a deterministic order, without needing to traverse your game’s object graph and update each entity.

> Note:
> If a component owned by an entity is a member of a component system, calling the entity’s ``doc://com.apple.gameplaykit/documentation/GameplayKit/GKEntity/update(deltaTime:)`` method will not update that component.

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)