Documentation Example¶
A reference page that shows every formatting feature these docs use, as it renders on the site. Use it as a cheat sheet when writing or reviewing guides.
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+S to save the scene and Ctrl+Z to undo. Combinations of three keys work too: Ctrl+Shift+Z redoes.
Abbreviations show a tooltip on hover: scripts use the C# API, and AI assistants connect over MCP.
Inline code with syntax highlighting:
Entity? player = Scene.FindEntityByTag("Player");
Icons:
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¶
- Install Lucky Engine
- Create a project
- Write a first script
- Record a dataset
Definition list¶
Entity- The base class for all scripts; override its lifecycle methods.
Component- Data and behaviour attached to an entity, retrieved with
GetComponent<T>().
Blockquote¶
Components hold the data; entities tie them together; scripts give them behaviour.
— 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:
from luckyrobots import Session
with Session() as sess:
sess.connect(timeout_s=30.0, robot="unitreego2")
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 | VerticalFOV |
(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 as part of the simulation step1, not on a background worker.
Grid of cards¶
-
Get started
Your first
Entityscript in a few lines. -
API reference
The public C# scripting API, grouped by area.
-
Lifecycle callbacks like
OnUpdaterun inside the simulation step, so avoid blocking them. ↩