# IActionRegistration

Interface in [Yarn.Unity](https://docs.yarnspinner.dev/3.1/api/csharp/yarn.unity)

## Summary

Contains methods that allow adding and removing Yarn commands and functions.

```csharp
public interface IActionRegistration
```

## Methods

| Name                                                                                                                                                                                                  | Description                                                                          |
| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------ |
| [AddCommandHandler(string,Delegate)](https://docs.yarnspinner.dev/3.1/api/csharp/yarn.unity/yarn.unity.iactionregistration/yarn.unity.iactionregistration.addcommandhandler-1)                        | Adds a command handler. Dialogue will pause execution after the command is called.   |
| [AddCommandHandler(string,MethodInfo)](https://docs.yarnspinner.dev/3.1/api/csharp/yarn.unity/yarn.unity.iactionregistration/yarn.unity.iactionregistration.addcommandhandler-2)                      | Adds a command handler. Dialogue will pause execution after the command is called.   |
| [AddFunction(string,Delegate)](https://docs.yarnspinner.dev/3.1/api/csharp/yarn.unity/yarn.unity.iactionregistration/yarn.unity.iactionregistration.addfunction)                                      | Add a new function that returns a value, so that it can be called from Yarn scripts. |
| [RegisterFunctionDeclaration(string,Type,Type\[\])](https://docs.yarnspinner.dev/3.1/api/csharp/yarn.unity/yarn.unity.iactionregistration/yarn.unity.iactionregistration.registerfunctiondeclaration) | Registers a function as existing, without supplying an implementation.               |
| [RemoveCommandHandler(string)](https://docs.yarnspinner.dev/3.1/api/csharp/yarn.unity/yarn.unity.iactionregistration/yarn.unity.iactionregistration.removecommandhandler)                             | Removes a command handler.                                                           |
| [RemoveFunction(string)](https://docs.yarnspinner.dev/3.1/api/csharp/yarn.unity/yarn.unity.iactionregistration/yarn.unity.iactionregistration.removefunction)                                         | Remove a registered function.                                                        |


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.yarnspinner.dev/3.1/api/csharp/yarn.unity/yarn.unity.iactionregistration.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
