<!--
{
  "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/GKComponent/update(deltaTime:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "GameplayKit"
    ],
    "preciseIdentifier" : "c:objc(cs)GKComponent(im)updateWithDeltaTime:"
  },
  "title" : "update(deltaTime:)"
}
-->

# update(deltaTime:)

Performs any custom periodic actions defined by the component subclass.

```
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

Override this method to implement per-frame logic specific to your component class. GameplayKit calls this method when you call the [`update(deltaTime:)`](/documentation/GameplayKit/GKEntity/update(deltaTime:)) method of the entity owning a component, or when you call the [`update(deltaTime:)`](/documentation/GameplayKit/GKComponentSystem/update(deltaTime:)) method of a [`GKComponentSystem`](/documentation/GameplayKit/GKComponentSystem) object that manages all components of a specific [`GKComponent`](/documentation/GameplayKit/GKComponent) subclass. Typically, you call one of those methods in response to a per-frame game loop method such as <doc://com.apple.documentation/documentation/SpriteKit/SKScene/update(_:)> (SpriteKit) or <doc://com.apple.documentation/documentation/SceneKit/SCNSceneRendererDelegate/renderer(_:updateAtTime:)> (SceneKit).

For more information, see [GameplayKit Programming Guide](https://developer.apple.com/library/archive/documentation/General/Conceptual/GameplayKit_Guide/index.html#//apple_ref/doc/uid/TP40015172).

---

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)