> For the complete documentation index, see [llms.txt](https://docs.yarnspinner.dev/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.yarnspinner.dev/3.1/api/csharp/yarn.markup/yarn.markup.replacementmarkerresult/yarn.markup.replacementmarkerresult.invisiblecharacters.md).

# InvisibleCharacters

Field in [ReplacementMarkerResult](/3.1/api/csharp/yarn.markup/yarn.markup.replacementmarkerresult.md)

## Summary

The number of invisible characters added into the line during processing.

```csharp
public int InvisibleCharacters;
```

## Remarks

This will vary depending on what the replacement markup needs to do.

* When only inserting rich-text tags, this should be the length of all inserted text. For example `"this is text with [bold]some bold[/bold] elements"` translated into Unity style rich-text become `"this is text with <b>some bold</b> elements"`. In this case then the value of `InvisibleCharacters` would be seven.
* When only modifying the content of the children text, such as making all text upper case, this should be `0`. For example `"this is text with [upper]some uppercased[/upper] elements"` is transformed into `"this is text with SOME UPPERCASED elements"`. The number of invisible character will be zero.
* When adding new content into the line (regardless of being added at the start, end, or middle) this should be zero but the replacement processor should make sure to shift along it's children attributes where appropriate. For example `"this is text with [emph]some emphasised[/emph] elements"` transformed into `"this is text with !!some emphasised!! elements"` the value of `InvisibleCharacters` would be zero. In this case however the `childAttributes` in [ProcessReplacementMarker(MarkupAttribute,System.Text.StringBuilder,List\<MarkupAttribute>,string)](/3.1/api/csharp/yarn.markup/yarn.markup.iattributemarkerprocessor/yarn.markup.iattributemarkerprocessor.processreplacementmarker.md) would need to be shifted down two.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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, and the optional `goal` query parameter:

```
GET https://docs.yarnspinner.dev/3.1/api/csharp/yarn.markup/yarn.markup.replacementmarkerresult/yarn.markup.replacementmarkerresult.invisiblecharacters.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
