Home

Awesome

UnityMarkdeepViewer

DEPRECATED

This was using the old Webview in the Unity editor which was removed in more recent version, so this won't work in more recent Unity version. Keeping this here as reference.

For more recent version of the editor, see this repository https://github.com/UnityGuillaume/MarkdownRenderer that is using the new UIToolkit used by the Untiy Editor to parse and render markdown directly in the Unity Editor UI.

Readme

WIP : This is a bit hacky and prototypy

Editor scripts allowing to display Markdown, Markdeep and HMTL directly inside the Unity Editor

It use the internal Unity Webview (used for example by the AssetStore or the Collab windows) recreated through reflection.

It handles :

Rendering is made with Markdeep.

Installation

There is 2 way to use the tool :

Multiple files

Copy the MarkdeepViewer folder into your project.

Single File install

To make it less invasive and easier to embed in other project, a single file version is available in the root of that project or through the release of the github page.

Just copy the MarkdeepViewerSingleFile.cs file into an Editor folder anywhere in your project or package

The single file version is just the 2 C# files of the editor window copied into a single one, and the markdeep and css files stored as string in that file class.

At runtime, the tool will create the 3 files in the Library folder so they can be referenced when the tool create the javascript to render

It is build through an editor script. The file CreateSingleFileVersion in MarkdeepViewer/Editor take care of creating it through a menu in the Unity editor.

Usage

When you click on an .html, .md.html, .md file, a button appear on the Inspector to open it in the Markdeep viewer. You can dock that window, and the next file you open through the button will be open in that window instead of a new one.

Styling

2 css are used by the system : dark_style.css and light_style.css in the folder Markdeep/Plugins

File format specification

Relative path works. E.g. [Link to another file]("../other/files.md")

HTML

Markdeep

Markdown

Known Issues and Limitations

TODO and possible improvement