Skip to content

Build the editor from source

The editor in the download is built with C# and Avalonia, from engine/editor/avalonia. This page builds it from source on macOS, to change it or to run code newer than the release.

The workspace tabs sit at the top of the window.

Tab What it does
2D Pans, zooms, picks and moves an Entity2D, with Select, Rotate, Scale and Pan tools, snap, a grid and rulers.
3D Draws the scene through the engine. A drag orbits, the wheel zooms and a click picks. The gizmo moves, rotates and scales.
Script Edits a project .cs file with colours, an outline and completion on Ctrl+Space or a typed dot.
Graph Edits .ograph graph scripts and stops on a breakpoint at a step. Your first graph script starts here.
Game Runs the project and shows its monitors and live scene tree.

Across the tabs it has these.

  • A launcher when no project is named. It lists recent projects and makes a new one from a template.
  • A command palette on Cmd+K. Shift+Cmd+O opens a scene by name.
  • Undo and redo of scene edits, listed in the History tab.
  • An inspector that shows every property of an entity’s class and edits several entities at once. Its Signals tab connects signals and its Import tab reimports a file.
  • Project > Export, with Download Templates and an install from a .tpz on disk. Export a game covers the templates.
  • C# debugging under netcoredbg, covered below.
  1. Install Xcode’s command line tools and SCons.
  2. Get the source at the 1.3.0 tag:
Terminal window
git clone --branch v1.3.0 https://github.com/ChxisB/orblit.git
  1. From the orblit folder, build the engine as a library:
Terminal window
scons platform=macos target=editor dev_build=yes library_type=shared_library
  1. Build the program too. The editor runs it to play the project:
Terminal window
scons platform=macos target=editor dev_build=yes

Check: bin/liborblit.macos.editor.dev.arm64.dylib and bin/orblit.macos.editor.dev.arm64 exist. On an Intel Mac the names end in x86_64 in place of arm64. Set ORBLIT_ENGINE_LIBRARY to use a library from another path. The program must sit beside it.

  1. Install the .NET 10 SDK.
  2. From engine/editor/avalonia, copy the sample project. The editor saves into the project it opens.
Terminal window
cp -R Orblit.Editor.Bridge.Checks/Fixtures/view_demo ~/view_demo
  1. From the same folder, start the editor on the copy:
Terminal window
dotnet run --project Orblit.Editor.App -- --project ~/view_demo

Check: the editor opens on main.oscn, and the engine window opens beside it.

Option What it does
--project <folder> Opens that project. With no project, the launcher opens.
--scene <res:// path> Opens that scene. The default is res://main.oscn.
--headless Runs the engine with no window, so the viewport stays empty.

Skip this if your games use no C#. The library stays without C#. Play runs the program beside it that was built last, so a C# game needs a program built with C#.

  1. From the orblit folder, build the program with the C# module:
Terminal window
scons platform=macos target=editor dev_build=yes module_csharp_enabled=yes
  1. Make the C# glue:
Terminal window
bin/orblit.macos.editor.dev.arm64.csharp --headless --generate-csharp-glue engine/modules/csharp/glue
  1. Build the C# assemblies into bin/OrblitSharp:
Terminal window
./engine/modules/csharp/build_scripts/build_assemblies.py --orblit-output-dir=bin --orblit-platform=macos

Check: bin/OrblitSharp exists, and bin/orblit.macos.editor.dev.arm64.csharp --version prints a version with csharp in it.

  1. Install netcoredbg. The editor does not include it.
  2. Put it on your PATH, or set ORBLIT_NETCOREDBG to its path.
  3. Open a .cs file in the Script tab and click in the gutter beside a line. A breakpoint appears.
  4. Run the project.

Check: the game stops on the line. The editor opens the script there, and the Debugger tab shows the stack and the locals. Its buttons pause, continue and step.

Without netcoredbg, the Debugger tab shows the game’s process id, so an outside IDE can attach.