Class AxolotlModuleContext
The intentionally small API exposed while initializing trusted module code.
public sealed class AxolotlModuleContext
- Inheritance
-
AxolotlModuleContext
- Inherited Members
Properties
Package
The package being initialized.
public AxolotlPackage Package { get; }
Property Value
Services
The game's root service provider. Registrations cannot mutate the built container.
public IServiceProvider Services { get; }
Property Value
Methods
RegisterAssetLoader(Type, Type)
Stages a runtime loader for registration after initialization succeeds.
public void RegisterAssetLoader(Type assetType, Type loaderType)
Parameters
RegisterExtension<TContract>(string, TContract)
Stages an implementation of a game-defined extension contract.
public void RegisterExtension<TContract>(string id, TContract extension) where TContract : class
Parameters
idstringextensionTContract
Type Parameters
TContract
RegisterGameObject(string, AxolotlGameObjectFactory)
Stages a package GameObject factory under a stable game-wide ID.
public void RegisterGameObject(string id, AxolotlGameObjectFactory factory)
Parameters
idstringfactoryAxolotlGameObjectFactory
RegisterPrefabComponent<TComponent>(string)
Stages a trusted module component under a stable prefab ID.
public void RegisterPrefabComponent<TComponent>(string id) where TComponent : Component, IPrefabDataReceiver
Parameters
idstring
Type Parameters
TComponent
RegisterScene(string, Type)
Stages a package scene type discovered at build time.
public void RegisterScene(string id, Type sceneType)
Parameters
RegisterScene<TScene>(string)
Stages a package scene under a stable game-wide ID.
public void RegisterScene<TScene>(string id) where TScene : BaseScene
Parameters
idstring
Type Parameters
TScene