Blazor Configuration
Set 2dog properties in MyGame.blazor/Client/MyGame.blazor.Client.csproj. The client references 2dog.engine, 2dog.blazor, and 2dog.browser-wasm. It normally sets GodotProjectDir=../..; see the global settings.
Client Properties
| Property | Default | Purpose |
|---|---|---|
TwoDogWebVariant | Follows the configuration | Native engine variant: debug or release |
TwoDogExportPack | true | Export the game pack as a static web asset; false uses an existing wwwroot/godot.pck in the client |
TwoDogWebExportPreset | Web | Preset in export_presets.cfg |
TwoDogWebPackName | godot.pck | Exported pack name; if you change it, set the same name in GodotView.PackUrl |
TwoDogWebSideModuleExports | true | Export native symbols used by GDExtensions |
WasmEmitSymbolMap | false in Release, true otherwise | Include native symbols for stack traces; explicit settings override the default |
WasmInitialHeapSize | 256MB | Initial memory allocation; memory can grow |
2dog.browser-wasm restores both supported native variants. If the payload for the selected variant is missing, the build fails. The client SDK manages its own bundle, progress, source maps, and compression. TwoDogWebSizeManifest, TwoDogWebStripMaps, and TwoDogWebPrecompress apply only to Web and WebXR hosts.
Publishing, Trimming, and AOT
Publish the server project to include its client:
dotnet publish MyGame.blazor -c Release -p:RunAOTCompilation=trueRunAOTCompilation enables Mono's browser AOT compiler. See Trimming for assemblies accessed only through reflection.
Keep the attributes on the client's generated 2dog.engine and browser package references. See the Blazor host guide for GodotView.
Experimental WebGPU
See New Tricks: WebGPU for GodotView renderer settings, browser requirements, and Compatibility fallback. See Forward+ and Mobile on the web to select the web renderer and bake shaders before export.