KernelAPI reference
Class HostBuilderExtensions
Namespace: MicroEngine.Core
Assembly: MicroEngine.dll
Guide: Composing a game for every platform
The game’s side of a HostBuilder: choosing the game, the platforms a host offers and changes to the
platform request. A game’s Configure entry point calls these; every host (desktop, browser, phones, tests)
reads them through GameHost.
public static class HostBuilderExtensionsInheritance
object ← HostBuilderExtensions
Methods
ConfigureRequest(HostBuilder, Func<PlatformRequest, PlatformRequest>)
Changes the platform request before the platform is built (an audio device or input sources of the host’s own, PlatformRequest); changes apply in the order added.
public static HostBuilder ConfigureRequest(this HostBuilder host, Func<PlatformRequest, PlatformRequest> change)Parameters
host HostBuilder
change Func<PlatformRequest, PlatformRequest>
Returns
The builder, for chaining.
Platforms(HostBuilder)
The platforms the host offers, in order of preference (filled with the host’s own before the game’s
Configure runs; add a profile to offer it with –platform).
public static PlatformCatalog Platforms(this HostBuilder host)Parameters
host HostBuilder
Returns
SaveStore(HostBuilder, string)
A save store for gameId on the composition’s medium (Storage), else the
platform’s default (DefaultStorage).
public static SaveStore SaveStore(this HostBuilder host, string gameId)Parameters
host HostBuilder
gameId string
Returns
UseGame(HostBuilder, Func<Game>)
The game this composition runs: create builds a new one for every run.
public static HostBuilder UseGame(this HostBuilder host, Func<Game> create)Parameters
host HostBuilder
Returns
The builder, for chaining.
UsePlatforms(HostBuilder, PlatformCatalog)
Replaces the platforms the host offers.
public static HostBuilder UsePlatforms(this HostBuilder host, PlatformCatalog catalog)Parameters
host HostBuilder
catalog PlatformCatalog
Returns
The builder, for chaining.