This fork adds a few tweaks needed for AssetUtility, which embeds two MarkdownViews in a documentation window.
Changes:
-
MarkdownViewer.Draw(float contentWidth = float.NaN)
Passing default value results in normal behavior, which would use the width of the entire editor window, but passing a value draws view in the specified width instead. -
MarkdownViewer.drawToolbar { get; set; } = true;
Prevents the toolbar from being drawn if false, true is normal behavior. -
HyperlinkHelper.HyperlinkOpened event Event is called when user presses a hyperlink. Event args provides cancel variable that can be used to disable normal behavior.
-
Changed cursor to MouseCursor.Link when hovering over a hyperlink.
A markdown viewer for unity
UMV is a Unity editor extension for displaying markdown files in the inspector window.
It should just work without any setup or configuration.
Clone the repository into the project Packages
directory
cd Packages
git clone https://github.com/gwaredd/UnityMarkdownViewer.git
Alternatively import the .unitypackage
file from the releases page.
Please note, I have renamed the master
branch to main
. This may affect existing clones.