An Unreal plugin that adds markdown as an asset type. This lets you embed documentation directly into your project.
MIT License
This adds markdown as an asset to the Unreal game engine.
- Tested on UE 5.3
- Note this also requires the Web Browser plugin to be enabled.
Behold, the latest game-changing feature in Unreal: Markdown! Why, you ask? Because sometimes, in the wild world of side projects, you need to document your midnight musings right where the magic happens – in the game editor itself! Now, you can scribble notes amid your digital dragons and spaceships. Genius or madness? Jury's still out. Really, I just fancied coding my own asset type for giggles. Any regrets? A smidge. But hey, it's done now. If others find it useful, brilliant! If not, at least my cat appreciates the extra keyboard time.
Plugins
folder.Edit -> Plugins
from the menu)Edit -> Plugins
from the menu)The plugin uses the UAssetEditorSubsystem from the engine to open any asset from a link to it.
You can add links to your project assets, C++ file or even specific functions of a C++ class.
You can directly copy and paste a reference to any asset or C++ file from the editor
Because Markdown files are assets too, you can reference them too! very useful to build one big index for your systems documentations
You can specify a function in a class link by adding ".FunctionName" at the end, right before the last "'" character. When clicked, the default IDE will show the class at the specific function.
i.e: to link the GetOwnerActor function inside the GameplayTask class the link is:
/Script/CoreUObject.Class'/Script/GameplayTasks.GameplayTask.GetOwnerActor'
There are two important parts to link something from the engine: should starts with "/Script" and the actual link should be between two ' characters after that.
/Script/CoreUObject.Class'/Script/GameplayTasks.GameplayTask.GetOwnerActor'
/Script '/Game/ThirdPerson/Maps/ThirdPersonMap.ThirdPersonMap'
The editor runs inside the unreal web browser client. Under the hood it is using markdown-it and I've enabled a bunch of plugins that extend the markdown language with some extra goodies. Here's a quick rundown of what's available.
Should be automatic for code blocks. You can specify the language like this:
```c++
#include "TestGamePlayerController.h"
#include "EnhancedInputSubsystems.h"
void ATestGamePlayerController::BeginPlay()
{
Super::BeginPlay();
}
```
Are added like this:
- [x] fix closing browser warning
- [x] add custom icon
- [ ] better editing experience
- [ ] add dark and light themes
Which gives this:
Headings are automatically given anchors, so you can link to them like this:
[Link](#ignore-extra-cells)
will jump to ...
## Ignore extra cells
You can automatically add a table of contents to your document like this:
[[toc]]
You can add math equations with MathJax by wrapping them with $
or $$
:
$e^{i\pi} - 1 = 0$
$$
\left( \frac{\partial^2}{\partial x^2} + \frac{\partial^2}{\partial y^2} \right) {| \varphi(x+ i y)|}^2 = 0
$$
Gives ...
Diagrams can be added with GraphViz (see markdown-it-textual-uml for details).
For example:
```plantuml
Bob -> Alice : hello
```
```dot
digraph example1 {
1 -> 2 -> { 4, 5 };
1 -> 3 -> { 6, 7 };
}
```
Which gives this:
PlantUML and Dot diagrams work fine. Ditaa and Mermaid, not so much.
You can embed videos from YouTube and Vimeo like this:
@[youtube](tgbNymZ7vqY)
@[youtube](http://www.youtube.com/embed/tgbNymZ7vqY)
NB: You might not want to ship with your documentation. Make sure the markdown assets are not included in your build, unless you really want to ship with them.
GL & HF