MarkdownRenderer

$4
Publisher BigCodersPlanet
File size 1.05MB
Number of files 13
Latest version 1.0.0
Latest release date 2024-10-03 05:33:11
First release date 2024-10-03 05:33:11
Supported Unity versions 2018.4.2 or higher

Markdown Unity UI Parser


The MarkdownRenderer is a tool that converts Markdown-formatted text into interactive and visually rich UI elements within a Unity application. Markdown is a lightweight markup language that allows you to easily style and format text using simple plain text symbols. Everthing runs at Runtime.


How Does It Work?


The parser processes Markdown text by recognizing various elements, such as headers, lists, blockquotes, tables, images, and more. These elements are converted into their corresponding Unity UI components, including text fields, images, and interactive links. This makes it easy to seamlessly integrate rich Markdown content into Unity’s canvas without manual UI setup.


For example, if you input:


# Welcome to the Game


The parser will detect the `#` symbol (indicating a header) and render it as a large, bold text element.


Markdown Features Supported:

  • Headers (#, ##, etc.)
  • Bold (text), *Italics* (text)
  • Lists (- item)
  • Blockquotes (> text)
  • Images (extern and base64)
  • extern Videos (mp4)
  • simple Tables
  • Links (internal and external)

The official Markdown standard is supported


What the Markdown Unity UI Parser Cannot Do

Although the Markdown Unity UI Parser is a powerful tool, it has some limitations. Here's what it cannot do:

  1. Limited Table Support: The parser only supports simple tables, meaning that more complex table structures (with nested elements or advanced formatting) may not render as expected. It adheres strictly to the table syntax outlined in the official Markdown guidelines.
  2. Markdown Syntax Strictness: The parser is designed to follow the official Markdown syntax. Some Markdown editors, may handle resources (like images or links) differently based on specific settings or extensions.
  3. External Resource Handling: While the parser can handle external resources, it relies on the provided URLs being correct and the resources being accessible. If an external resource is not found, the parser will not attempt to fetch or substitute it.

Important: External resources are only supported with our own converter tool, which is described below. This workflow was chosen to remain as independent as possible from Unity. The advantage of this approach is that all resources rendered in Markdown are not stored as individual resources in the asset database.


Need Help?

If you encounter any issues while using the Markdown Unity UI Parser, or if you need further assistance with integrating Markdown into your Unity project, feel free to reach out to us. We're happy to help!

Top Publisher Assets