# ActionMarkupHandler

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

Inherits from `UnityEngine.MonoBehaviour`

## Summary

This is an abstract monobehaviour that conforms to the [IActionMarkupHandler](https://docs.yarnspinner.dev/3.1/api/csharp/yarn.unity/yarn.unity.iactionmarkuphandler) interface.

```csharp
public abstract class ActionMarkupHandler : MonoBehaviour, IActionMarkupHandler
```

## Remarks

Intended to be used in situations where you require a monobehaviour version of the interfaces. This is used by [LinePresenter](https://docs.yarnspinner.dev/3.1/api/csharp/yarn.unity/yarn.unity.linepresenter) to have a list of handlers that can be connected up via the inspector.

## Methods

| Name                                                                                                                                                                                                         | Description                                                                          |
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ |
| [OnCharacterWillAppear(int,MarkupParseResult,CancellationToken)](https://docs.yarnspinner.dev/3.1/api/csharp/yarn.unity/yarn.unity.actionmarkuphandler/yarn.unity.actionmarkuphandler.oncharacterwillappear) | Called repeatedly for each visible character in the line.                            |
| [OnLineDisplayBegin(MarkupParseResult,TMP\_Text)](https://docs.yarnspinner.dev/3.1/api/csharp/yarn.unity/yarn.unity.actionmarkuphandler/yarn.unity.actionmarkuphandler.onlinedisplaybegin)                   | Called immediately before the first character in the line is presented.              |
| [OnLineDisplayComplete()](https://docs.yarnspinner.dev/3.1/api/csharp/yarn.unity/yarn.unity.actionmarkuphandler/yarn.unity.actionmarkuphandler.onlinedisplaycomplete)                                        | Called after the last call to `PresentCharacter(int, TMP_Text, CancellationToken)` . |
| [OnLineWillDismiss()](https://docs.yarnspinner.dev/3.1/api/csharp/yarn.unity/yarn.unity.actionmarkuphandler/yarn.unity.actionmarkuphandler.onlinewilldismiss)                                                | Called right before the line will dismiss itself.                                    |
| [OnPrepareForLine(MarkupParseResult,TMP\_Text)](https://docs.yarnspinner.dev/3.1/api/csharp/yarn.unity/yarn.unity.actionmarkuphandler/yarn.unity.actionmarkuphandler.onprepareforline)                       | Called when the line view receives the line, to prepare for showing the line.        |


---

# 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.actionmarkuphandler.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.
