Unity Markdown Viewer
View Markdown files directly in the Unity Editor Inspector with syntax highlighting, theme presets, anchor navigation, tables, images, GIF support, and project settings integration.
com.ab.unitymarkdownviewer 
Install via UPM
Add to Unity Package Manager using this URL
https://www.pkglnk.dev/unitymarkdownviewer.git README Markdown
Copy this to your project's README.md
## Installation
Add **Unity Markdown Viewer** to your Unity project via Package Manager:
1. Open **Window > Package Manager**
2. Click **+** > **Add package from git URL**
3. Enter:
```
https://www.pkglnk.dev/unitymarkdownviewer.git
```
[](https://www.pkglnk.dev/pkg/unitymarkdownviewer)README
Unity Markdown Viewer for Unity Editor
A Unity Markdown viewer and Unity Editor markdown inspector for
.mdand.markdownfiles, with syntax highlighting, theme presets, anchor links, tables, images, GIF support, and project documentation workflows.
Overview
Unity Markdown Viewer is a Unity Editor plugin that renders Markdown files directly inside the Unity Inspector. It is designed for teams that keep game documentation, technical design docs, README files, changelogs, onboarding notes, and editor help content inside a Unity project.
This package is a complete rewrite and significant enhancement of the original UnityMarkdownViewer project. It provides a polished Markdown reader for Unity, with theme customization, syntax highlighting, anchor navigation, admonitions, images, GIF support, and a workflow that fits real Unity projects.
Perfect for:
- Displaying project documentation and guides
- Rendering game design documents
- Creating interactive changelogs and release notes
- Managing in-editor help and tutorials
Keywords
Unity markdown viewer, Unity markdown editor, Unity markdown inspector, Unity README viewer, Unity documentation plugin, Unity changelog viewer, Unity .unitypackage, Unity Editor tools, Markdown for Unity, in-editor documentation for Unity.
Features
⨠Core Features
- š Full Markdown Support ā Headers, emphasis, lists, code blocks, blockquotes, tables, and more
- šØ 10+ Theme Presets ā VS Code Dark+, GitHub Light/Dark, Dracula, Nord, Solarized, OneDark, Catppuccin, Monokai
- š Interactive Anchor Navigation ā Click headings to jump to sections (anchor links like
[jump](#section-id)) - šø Image Rendering ā Inline images and GIFs with automatic caching and web support
- š Emoji Support Across Unity Versions ā Unity 6 uses native emoji rendering, while Unity versions older than Unity 6 use a configurable CDN image source chain
- š·ļø GitHub-style Admonitions ā
> [!NOTE],[!TIP],[!WARNING],[!IMPORTANT],[!CAUTION] - šÆ Heading IDs ā Custom anchor IDs with
{#custom-id}syntax
šØ Syntax Highlighting
- Multi-language support ā C#, HLSL, JavaScript, Python, Java, Go, Rust, CSS, HTML, YAML, and more
- Smart color coding ā Keywords, types, strings, comments, numbers, methods
- Theme-aware ā Colors adapt to selected theme
šļø Editor Features
- Live theme preview ā Side-by-side light/dark skin comparison
- One-click preset application ā Instantly switch between 10 beautiful themes
- Project Settings integration ā Configure the active theme from
Project/AB/Markdown Viewer - Raw text mode ā Toggle between formatted and raw markdown view
- Responsive layout ā Automatically adapts to Inspector width
- Dark mode support ā Seamless integration with Unity Editor UI
- Pre-Unity-6 emoji fallback ā Unity versions older than Unity 6 display emoji through a configurable inline image fallback chain instead of unreliable IMGUI text glyphs
š§ Advanced Capabilities
- HTML entity handling ā Proper rendering of
<,>,&and other special characters - Smart text wrapping ā Intelligent line breaking for long content
- Code block syntax ā Specify language for proper highlighting (e.g.,
```csharp) - Table rendering ā Full support for GitHub-style Markdown tables
- Escape sequences ā Raw text mode toggles markdown/plaintext view
Current Highlights
This is a comprehensive rewrite with nearly 100% new code, built from the ground up with:
| Feature | Original | New |
|---|---|---|
| Anchor Navigation | ā | ā Full scrolling support |
| Admonitions | ā | ā
GitHub-style [!NOTE], [!TIP], etc. |
| Syntax Highlighting | ā | ā 9+ languages with theme-aware colors |
| Theme Presets | 1 (Dark) | ā 10 professional presets |
| Image Support | ā Basic | ā Enhanced with caching |
| HTML Entities | Partial | ā Full support |
| Theme Editor UI | ā | ā Visual side-by-side editor |
| Markdig Parser | ā | ā Enhanced integration |
Installation
If you are searching for a Unity markdown plugin, Unity markdown renderer, or Unity README viewer for the Inspector, this package installs as a standard .unitypackage under Assets/AB/Unity-Markdown-Viewer.
Option 1: Unity Package
- Download the
.unitypackagefrom Releases - Drag it into your Unity project, or use Assets > Import Package > Custom Package
- Select any
.mdor.markdownfile to view it
Option 2: Unity Package Manager (Git URL)
- Open Window > Package Manager
- Click the + button
- Choose Add package from git URL...
- Enter:
https://github.com/ahalbahar/Unity-Markdown-Viewer.git - Unity installs the package as
com.ab.unitymarkdownviewer
You can also add it directly in Packages/manifest.json:
{
"dependencies": {
"com.ab.unitymarkdownviewer": "https://github.com/ahalbahar/Unity-Markdown-Viewer.git"
}
}
When installed through Package Manager, the package lives under Packages/com.ab.unitymarkdownviewer. The editable MarkdownTheme asset is created automatically under Assets/AB/Unity-Markdown-Viewer/Theme, so project-specific theme changes stay writable.
Option 3: Direct Folder (Manual Clone)
- Clone or download this repository
- Create
Assets/AB/Unity-Markdown-Viewerin your Unity project - Copy this repository's package contents into that folder:
Scripts/AB.MDV.asmdef,Scripts/,Theme/,Sample/,README.md,CHANGELOG.md,CONTRIBUTING.md,LICENSE.md, andpackage.json - Unity automatically imports the custom editor
- Select any
.mdor.markdownfile to view it in the Inspector
Release Packaging
GitHub Releases are built without Unity. The release workflow stages the repository contents into Assets/AB/Unity-Markdown-Viewer and uses natsuneko-laboratory/create-unitypackage@v3 to generate the published .unitypackage.
Release workflow behavior:
- pushing a
v*tag builds the package, uploads the artifact, and publishes the GitHub Release - running Actions > Release Unity Package > Run workflow builds the package again without needing a new tag and uploads it as a workflow artifact
- manual runs can optionally set a version label; otherwise the artifact is named with
manual-<run number>
The staged export intentionally includes only the Unity plugin payload:
Scripts/, Theme/, Sample/, README.md, CHANGELOG.md, LICENSE.md, and package.json.
Usage
Viewing Markdown Files
- Create or place a
.mdfile in your project - Select it in the Project window
- View it in the Inspector (no configuration needed!)
This makes the package useful as a Unity README viewer, Unity changelog viewer, Unity documentation browser, and lightweight Markdown-based help system for editor tooling.
Navigation
- Back/Forward buttons ā Browse previously opened markdown files
- Click anchor links ā
[Go to Section](#section-heading)jumps to that heading - Raw toggle ā Switch between formatted markdown and raw text view
Theming
- Find or create a
MarkdownThemeasset:- Right-click in Project window ā Create > Markdown > Theme
- Open the theme in either of these places:
- Select the asset in the Project window to open the theme editor
- Open Project Settings > AB > Markdown Viewer to edit the active theme from settings
- Click any preset button to instantly apply a theme:
- VS Code Dark+, GitHub Light/Dark, Dracula Dark
- Nord Dark, OneDark Dark, Monokai Dark
- Solarized Dark/Light, Catppuccin Mocha Dark
- Fine-tune colors in the side-by-side editor
- The Project Settings page shows the active theme asset and keeps edits in sync with the asset inspector
- The same theme asset also contains the emoji fallback source chain used only by Unity versions older than Unity 6
Emoji Source Chain Configuration
The MarkdownTheme asset includes an Emoji Fallback Sources (Unity Versions Older Than Unity 6) section. This is used only on Unity versions older than Unity 6, where IMGUI cannot render full-color emoji reliably.
Default behavior:
- a grapheme-aware CDN source is tried first
- OpenMoji and Twemoji codepoint PNG URLs are used as fallbacks
- sources are tried in order until one succeeds
- if all sources fail or the editor is offline, the viewer falls back to plain text instead of throwing hard errors
Supported URL template tokens:
{emoji}: the raw emoji grapheme itself{codepoints_lower}: hyphen-separated lowercase codepoints{codepoints_upper}: hyphen-separated uppercase codepoints{codepoints_lower_no_vs}: lowercase codepoints withFE0Fremoved{codepoints_upper_no_vs}: uppercase codepoints withFE0Fremoved
Example template:
https://emoji-cdn.mqrio.dev/{emoji}?style=google
Recommended ordering:
- put grapheme-aware providers first
- put codepoint-based providers after them
- keep the broadest and most reliable source at the top of the list
Writing Markdown
Headers with Anchor IDs
## My Section {#my-section}
[Jump to section](#my-section)
GitHub-style Admonitions
> [!NOTE]
> This is a note
> [!TIP]
> Here's a helpful tip
> [!WARNING]
> Be careful!
Code Blocks with Syntax Highlighting
```csharp
public void MyMethod()
{
Debug.Log("Highlighted!");
}
```
Tables
| Header 1 | Header 2 |
|----------|----------|
| Cell 1 | Cell 2 |
| Cell 3 | Cell 4 |
Images (supports GIF)

Emoji
# Release Notes š
Everything is green ā
Unity 6 renders emoji through the editor's native text system. Unity versions older than Unity 6 use the configured emoji source chain to resolve inline color emoji images in the formatted markdown view.
Architecture
Project File Structure
Assets/AB/Unity-Markdown-Viewer/
āāā Scripts/
ā āāā Editor/
ā āāā MarkdownEditor.cs # Custom Inspector for .md files
ā āāā MarkdownViewer.cs # Core rendering engine
ā āāā MarkdownTheme.cs # Theme system + presets
ā āāā MarkdownThemeEditor.cs # Visual theme editor
ā āāā MarkdownPreferences.cs # User preferences & configuration
ā āāā Layout/ # Layout engine and positioning
ā āāā Renderer/ # Markdown element renderers
āāā Theme/ # Theme asset and GUI skins
āāā Sample/ # Example markdown files
āāā README.md # Documentation
Compatibility
| Feature | Status |
|---|---|
| Unity 6 | ā Full support (UIElements + IMGUI) |
| Unity 2022 LTS | ā Tested |
| Unity 2021 LTS | ā Compatible |
| Emoji Rendering | ā Native on Unity 6, inline color image fallback on Unity 2021/2022 |
| Windows | ā Tested |
| macOS | ā Compatible |
| Linux | ā Compatible |
Why Use This Package
- Keeps Markdown documentation inside the Unity Editor instead of forcing teammates to switch to an external app.
- Makes README files, changelogs, design notes, and internal guides searchable and reviewable in the same project workflow.
- Ships as a plain Unity plugin under
Assets/AB/Unity-Markdown-Viewer, which keeps import paths predictable for teams and release automation.
Performance
- Fast rendering ā Lazy layout with caching
- Responsive ā Optimized for large documents (100+ KB)
- Low memory ā Efficient texture pooling for images
- Smooth scrolling ā Native UIElements integration
Customization
Create Custom Themes
// Create a new MarkdownTheme asset and customize in the editor
// Or programmatically:
var theme = ScriptableObject.CreateInstance<MarkdownTheme>();
theme.Light.Text = new Color(0.2f, 0.2f, 0.2f);
theme.Dark.Text = new Color(0.9f, 0.9f, 0.9f);
You can edit the active theme either by selecting the MarkdownTheme asset directly or from
Project Settings > AB > Markdown Viewer.
Extend Syntax Highlighting
Edit SyntaxHighlighter.cs to add new language patterns or color schemes.
Troubleshooting
Troubleshooting Guide
| Issue | Solution |
|---|---|
| Markdown doesn't display | Ensure file extension is .md or .markdown |
| Images don't load | Check relative paths; absolute paths use project root |
| Emoji look missing or monochrome on Unity versions older than Unity 6 | Use the formatted markdown view and verify the MarkdownTheme emoji source chain foldout; pre-Unity-6 editors fetch emoji through the configured CDN sources and need network access on first load |
| Anchor links don't scroll | Ensure heading has proper ID (auto-generated or {#id}) |
| Theme colors wrong | Open Project Settings > AB > Markdown Viewer and verify the active MarkdownTheme asset |
| Text is tiny | Adjust zoom in Editor Preferences or theme font sizes |
Contributing
See CONTRIBUTING.md for guidelines on submitting issues, feature requests, and pull requests.
Credits
- Original Project: UnityMarkdownViewer by gwaredd (MIT License)
- Parser: Markdig ā A fast, powerful .NET Markdown parser
- Rewrite & Enhancements: Ahmad Albahar
License
MIT License ā See LICENSE.md for details.
This is a complete rewrite of the original UnityMarkdownViewer project. It maintains the same MIT license to respect the original author's work while providing significant enhancements and modern features.
Changelog
See CHANGELOG.md for version history and updates.
Support
- š Found a bug? Open an issue
- š” Have an idea? Request a feature
- š¤ Want to help? Contribute
Happy documenting! šāØ
Comments
No comments yet. Be the first!
Sign in to join the conversation
Sign In