Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/ProwlEngine/Prowl/llms.txt

Use this file to discover all available pages before exploring further.

When your game is ready to ship, Prowl’s build pipeline compiles your C# scripts, bundles all referenced assets, and outputs a self-contained executable alongside a GameData/ directory. The whole process is orchestrated through the Build Window in the editor, which drives the Desktop_Player builder — a concrete implementation of the abstract ProjectBuilder class. The result is a standalone executable (platform-native binary) that depends only on the .NET 9 runtime and your bundled assets, with no editor code included.

Opening the Build Window

In the Prowl editor, open the Build Window panel. Here you:
  1. Add the scenes you want included in the build (at least one is required).
  2. Choose the target Platform (Windows, Linux, macOS) and Architecture (x64, Arm64, …).
  3. Select Debug or Release configuration.
  4. Choose Asset Packing mode: All Assets or Used Assets (dependency-traced from the scene list).
  5. Optionally enable AOT Compilation (BuildProjectSettings.EnableAOTCompilation) for ahead-of-time native compilation.
  6. Set the output directory and click Build.

Build Steps

1

Validate the project and scenes

ProjectBuilder.StartBuild checks that a project is loaded and that every scene AssetRef in the list is available. If validation fails, the build aborts with a descriptive error in the console.
2

Compile user scripts

Desktop_Player calls CompileProject, which regenerates the .csproj for your game code and compiles it with dotnet into a GameName.dll. The output lands in Temp/bin/GameName/Build/.
// Inside Desktop_Player.CompileProject (simplified)
active.GenerateGameProject();
active.CompileGameAssembly(new DotnetCompileOptions
{
    isRelease      = configuration == Configuration.Release,
    isSelfContained = false,
    platform       = platform,
    architecture   = architecture,
    outputPath     = project,
    tempPath       = tmpProject,
});
3

Compile the Desktop Player shell

The thin DesktopPlayer executable (found under Players/Desktop/ next to the editor binary) is copied to a temp directory, given a generated .csproj that references Prowl.Runtime and your game DLL, then compiled into the output folder as a self-contained native binary.
// Key options used when compiling the player
CSProjectOptions options = new()
{
    OutputName             = "DesktopPlayer",
    OutputExecutable       = true,
    AllowUnsafeCode        = true,
    EnableAOTCompatibility = true,
    PublishAOT             = BuildProjectSettings.Instance.EnableAOTCompilation,
};
options.AddReference(runtimeAssembly, copyLocal: true);
options.AddReference(gameLibrary);
4

Pack assets

Assets are exported into <OutputDir>/GameData/ as Prowl build packages.
  • Used Assets (default): AssetDatabase.GetDependenciesDeep traces all assets referenced from your scenes. All Shader assets are always included regardless.
  • All Assets: AssetDatabase.ExportAllBuildPackages exports every asset in the project.
// Used Assets mode
HashSet<Guid> assets = [];
foreach (AssetRef<Scene> scene in scenes)
    AssetDatabase.GetDependenciesDeep(scene.AssetID, ref assets);

// Always include shaders
foreach (var shader in AssetDatabase.GetAllAssetsOfType<Shader>())
    assets.Add(shader.Item2);

AssetDatabase.ExportBuildPackages(assets.ToArray(), new DirectoryInfo(dataPath));
5

Pack scenes

Each scene is serialized to binary using Prowl.Echo and written to GameData/scene_0.prowl, scene_1.prowl, etc. Scene order in the Build Window determines load order at runtime.
EchoObject tag = Serializer.Serialize(scene.Res!);
tag.WriteToBinary(new FileInfo(Path.Combine(dataPath, $"scene_{i}.prowl")));
6

Pack project settings

Any ScriptableSingleton that has a [FilePath(Location.Setting)] attribute is copied to GameData/ via its CopyTo(string path) static method, so runtime settings (input maps, quality levels, etc.) are available to the standalone player.

Build Output Structure

OutputDir/
├── DesktopPlayer.exe        ← standalone entry point (platform executable)
├── GameData/
│   ├── scene_0.prowl        ← serialized scenes
│   ├── scene_1.prowl
│   ├── *.prowlpackage       ← bundled asset packages
│   └── *.prowlsetting       ← project settings
└── (runtime .dlls if not AOT)
The GameData/ directory must always be co-located with the executable. Do not move or rename it.

Debug vs Release

SettingDebugRelease
OptimizationNoneFull (dotnet publish -c Release)
SymbolsIncludedStripped
DEBUG defineActiveInactive
Debug.Log callsActiveActive (use log levels to filter)
Use Debug builds while iterating so you get stack traces on crashes. Switch to Release for distribution.

AOT Compilation

When BuildProjectSettings.EnableAOTCompilation is true, the player is published with PublishAOT = true. This produces a single native binary with no JIT dependency, which reduces startup time and memory usage at the cost of longer build times. AOT requires all generic instantiations to be statically resolvable — if you use heavy runtime reflection, test your build in AOT mode early.
// BuildProjectSettings (editor-side) — toggle in the Build Window UI
public bool EnableAOTCompilation = false;
AOT compilation is experimental. Dynamic code generation (Reflection.Emit, source generators that run at runtime, etc.) will fail at publish time. Prowl’s own serialization layer is designed to be AOT-compatible.

Platform Targets

Windows

Set platform = Platform.Windows. Outputs DesktopPlayer.exe. Tested on x64 and Arm64.

Linux

Set platform = Platform.Linux. Outputs a native ELF binary. Requires the .NET 9 runtime or AOT mode.

macOS

Set platform = Platform.OSX. Outputs a native Mach-O binary. Universal (x64 + Arm64) requires two separate builds for now.
Android, iOS, and WebAssembly (browser) targets are not yet supported. Contributions are welcome — see the ProjectBuilder abstract class for the extension point.

What’s Included in the Build

ComponentSource
DesktopPlayer hostPlayers/Desktop/ template in the editor install
Prowl.Runtime.dllCopied as a reference from the editor install
GameName.dllYour compiled game scripts
Veldrid + backendsTransitive reference from Prowl.Runtime
Asset packagesExported from AssetDatabase
ScenesSerialized via Prowl.Echo
Project settingsCopied from editor settings folder
The editor assemblies (Prowl.Editor, Prowl.Editor.Build, etc.) are never included in the build output.

Iterating Quickly

For fast iteration during development, use Play Mode in the editor rather than a full build. A full build is only required when testing asset streaming, platform-specific rendering paths, or AOT behavior. The Used Assets packing mode dramatically reduces build times for large projects by skipping assets not reachable from the included scenes.

Build docs developers (and LLMs) love