Parser

using MarkdownToUnity.Runtime;

UnityUIMarkdownTextAsset asset = MarkdownUnityParser.ParseMarkdown(markdownText);
using MarkdownToUnity.Runtime;

// One instance per place you render into - it holds the current render
// state, so don't share a single instance across simultaneous renders.
private readonly MarkdownUnityRenderer renderer = new MarkdownUnityRenderer();

private IEnumerator Test(TextAsset markZip, string languageMarker)
{
    if (spinner != null) spinner.SetActive(true);

    Task<UnityUIMarkdownTextAsset> parseTask = MarkdownUnityParser.ParseMarkdown(markZip, languageMarker);
    yield return new WaitUntil(() => parseTask.IsCompleted);

    if (parseTask.IsFaulted)
    {
        Debug.LogError($"Exception: {parseTask.Exception?.InnerException?.Message}");
    }
    else
    {
        UnityUIMarkdownTextAsset asset = parseTask.Result;
        if (asset != null)
        {
            renderer.Render(asset, content, textPrefab.gameObject, horizontalLinePrefab, blockquotePrefab, codeBlockPrefab);
            // Or your own rendering logic
        }
    }

    if (spinner != null) spinner.SetActive(false);
}

MarkdownUnityRenderer is a plain class, not static — each instance owns its own style settings and render state, so several can render or stream independently at the same time without interfering with each other.

What are your feelings

Updated on 8. September 2026