# LineProviderBehaviour

Class in [Yarn.Unity](/2.0/api/csharp/yarn.unity.md)

Inherits from `MonoBehaviour`

## Summary

A `MonoBehaviour` that produces [LocalizedLine](/2.0/api/csharp/yarn.unity/yarn.unity.localizedline.md) s.

```csharp
public abstract class LineProviderBehaviour : MonoBehaviour
```

## Remarks

[DialogueRunner](/2.0/api/csharp/yarn.unity/yarn.unity.dialoguerunner.md) s use a [LineProviderBehaviour](/2.0/api/csharp/yarn.unity/yarn.unity.lineproviderbehaviour.md) to get [LocalizedLine](/2.0/api/csharp/yarn.unity/yarn.unity.localizedline.md) s, which contain the localized information that [DialogueViewBase](/2.0/api/csharp/yarn.unity/yarn.unity.dialogueviewbase.md) classes use to present content to the player.

Subclasses of this abstract class may return subclasses of [LocalizedLine](/2.0/api/csharp/yarn.unity/yarn.unity.localizedline.md) . For example, [AudioLineProvider](/2.0/api/csharp/yarn.unity/yarn.unity.audiolineprovider.md) returns an [AudioLocalizedLine](/2.0/api/csharp/yarn.unity/yarn.unity.audiolocalizedline.md) , which includes `AudioClip` ; views that make use of audio can then access this additional data.

## Fields

| Name                                                                                                                                 | Description |
| ------------------------------------------------------------------------------------------------------------------------------------ | ----------- |
| [textLanguageCode](/2.0/api/csharp/yarn.unity/yarn.unity.lineproviderbehaviour/yarn.unity.lineproviderbehaviour.textlanguagecode.md) |             |

## Methods

| Name                                                                                                                                            | Description                                                                                                                                       |
| ----------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- |
| [GetLocalizedLine(Yarn.Line)](/2.0/api/csharp/yarn.unity/yarn.unity.lineproviderbehaviour/yarn.unity.lineproviderbehaviour.getlocalizedline.md) | Prepares and returns a [LocalizedLine](/2.0/api/csharp/yarn.unity/yarn.unity.localizedline.md) from the specified `Yarn.Line` .                   |
| [PrepareForLines(IEnumerable)](/2.0/api/csharp/yarn.unity/yarn.unity.lineproviderbehaviour/yarn.unity.lineproviderbehaviour.prepareforlines.md) | Signals to the line provider that lines with the provided line IDs may be presented shortly.                                                      |
| [Start()](/2.0/api/csharp/yarn.unity/yarn.unity.lineproviderbehaviour/yarn.unity.lineproviderbehaviour.start.md)                                | Called by Unity when the [LineProviderBehaviour](/2.0/api/csharp/yarn.unity/yarn.unity.lineproviderbehaviour.md) has first appeared in the scene. |

## Properties

| Name                                                                                                                             | Description                                                                                                                                                                                         |
| -------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| [LinesAvailable](/2.0/api/csharp/yarn.unity/yarn.unity.lineproviderbehaviour/yarn.unity.lineproviderbehaviour.linesavailable.md) | Gets a value indicating whether this line provider is ready to provide [LocalizedLine](/2.0/api/csharp/yarn.unity/yarn.unity.localizedline.md) objects. The default implementation returns `true` . |
| [YarnProject](/2.0/api/csharp/yarn.unity/yarn.unity.lineproviderbehaviour/yarn.unity.lineproviderbehaviour.yarnproject.md)       |                                                                                                                                                                                                     |


---

# 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/2.0/api/csharp/yarn.unity/yarn.unity.lineproviderbehaviour.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.
