---
title: "register(_:)"
framework: realitykit
role: symbol
role_heading: Type Method
path: "realitykit/forceeffectprotocol/register(_:)"
---

# register(_:)

Registers the custom effect.

## Declaration

```swift
@MainActor @preconcurrency static func register(_ updateHandler: (@MainActor (inout ForceEffectEvent<Self>) -> Void)? = nil)
```

## Parameters

- `updateHandler`: A closure that computes custom forces for rigid bodies.

## Discussion

Discussion If a handler is specified, the physics system calls the handler and ignores the update function.
