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

# subscribe(to:_:)

## Declaration

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