<!--
{
  "availability" : [
    "iOS: 18.0.0 -",
    "iPadOS: 18.0.0 -",
    "macCatalyst: 18.0.0 -",
    "macOS: 15.0.0 -",
    "tvOS: 26.0.0 -",
    "visionOS: 2.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "RealityKit",
  "identifier" : "/documentation/RealityKit/EntityAction/registerAction()",
  "metadataVersion" : "0.1.0",
  "role" : "Type Method",
  "symbol" : {
    "kind" : "Type Method",
    "modules" : [
      "RealityKit"
    ],
    "preciseIdentifier" : "s:17RealityFoundation12EntityActionPAAE08registerD0yyFZ::OverloadGroup"
  },
  "title" : "registerAction()"
}
-->

# registerAction()

Registers the action into the action-types registry.

```
static func registerAction()
```

## Discussion

Registering an action allows RealityKit to retrieve its [`AnimationResource`](/documentation/RealityKit/AnimationResource)
definitions.

Registering an action may not be necessary, because RealityKit automatically
registers the action when you:

- Initialize an [`ActionAnimation`](/documentation/RealityKit/ActionAnimation) with this action.
- Subscribe to it in any way,
  including subscribing an [`ActionHandlerProtocol`](/documentation/RealityKit/ActionHandlerProtocol).

---

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)