Documentation Example¶
A reference page that exercises every formatting feature enabled on this site. Use it as a copy-paste cheat sheet when writing guides. View source for the exact Markdown.
Headings¶
The page title above is an h1. Section headings (h2) appear in the right-hand table of
contents; sub-headings nest under them.
Heading level 3¶
Heading level 4¶
Heading level 5¶
Heading level 6¶
Inline text¶
Regular text with bold, italic, bold italic, strikethrough, highlighted,
inserted, and inline code. Subscripts like H2O and superscripts like a2 + b2 = c2.
A link to the Entity reference, an external link to Material for MkDocs, and an autolink: https://luckyrobots.com.
Press Ctrl+C to copy and Ctrl+Shift+V to paste. On macOS that's Cmd+C.
Abbreviations show a tooltip on hover: the API is built on an ECS.
Inline code with syntax highlighting: Entity player = Entity.FindEntityByTag("Player");
Icons and emoji:
and
.
Lists¶
Unordered & nested¶
- Scene graph
- Entities
- Components
- Prefabs
- Entities
- Math
- Physics
Ordered¶
- Derive a class from
Entity. - Override a lifecycle method.
- Attach the script to an entity.
Task list¶
- Generate the API reference
- Apply the brand theme
- Backfill
///doc comments - Publish to GitHub Pages
Definition list¶
Entity- The base class for all scripts; override its lifecycle methods.
Component- Data and behavior attached to an entity, retrieved with
GetComponent<T>().
Blockquote¶
Components hold the data; entities tie them together; scripts give them behavior.
— The scripting model
Admonitions¶
Every type, with a custom title:
Note
General information worth calling out.
Abstract / Summary
A high-level overview of what follows.
Info
Neutral, supplementary detail.
Tip
A helpful suggestion or best practice.
Success
Something completed or passing.
Question
A frequently asked question.
Warning
Be careful — this needs attention.
Failure
Something did not work.
Danger
Critical: this can break things.
Bug
A known issue or gotcha.
Example
A worked example follows.
Quote
A cited passage.
A title-less admonition and a collapsible one:
Tip
With no title argument, the type name is used as the heading.
Collapsible (click to expand)
Use ??? for a collapsed block and ???+ for one that starts open.
Collapsible, open by default
This starts expanded.
Code blocks¶
Plain fenced block:
With a language, title, line numbers, and highlighted lines:
| Spinner.cs | |
|---|---|
Other languages:
Code annotations¶
- Annotations let you attach explanatory notes to specific lines — click the marker.
Content tabs¶
Tables¶
| Component | Purpose | Common members |
|---|---|---|
TransformComponent |
Position / rotation / scale | Translation |
RigidBodyComponent |
Dynamic physics body | AddForce |
CameraComponent |
Render viewpoint | FieldOfView |
(Columns above are left-, left-, and right-aligned.)
Diagram (Mermaid)¶
graph LR
A([OnCreate]) --> B[OnUpdate]
B --> C{Input?}
C -- key down --> D[Move entity]
C -- otherwise --> B
D --> B
Buttons¶
Primary action Secondary action
Tracked changes (critic markup)¶
The robot moved slowly swiftly toward the goal.
You can replace thiswith that, mark a passage, or leave a side comment.
Footnotes¶
Scripts run on the simulation thread1, not a background worker.
Grid of cards¶
-
Get started
Your first
Entityscript in a few lines. -
API reference
Every public type in the
Hazelnamespace.
That's the full toolbox. If a feature you need isn't here, it can be enabled in
mkdocs.yml under markdown_extensions.
-
Lifecycle callbacks like
OnUpdateare invoked on the engine's main update loop; avoid blocking them. ↩