---
title: "subscribe(to:_:)"
framework: realitykit
role: symbol
role_heading: Type Method
path: "realitykit/behaviortreeaction/subscribe(to:_:)-9mrvx"
---

# subscribe(to:_:)

## Declaration

```swift
@MainActor @preconcurrency static func subscribe(to eventType: ActionEventType, _ handler: @escaping @MainActor (ActionEvent<Self>) -> ActionResult)
```

## See Also

### Subscribing to events

- [subscribe(to:_:)](realitykit/behaviortreeaction/subscribe(to:_:)-3p0pj.md)
