Class UnityCharacterInstaller
Unity-specific installer for the Character service. Creates a UnityCharacterService on a dedicated GameObject and auto-discovers CharacterConfigSO assets tagged with the Addressables label CHARACTER. The same GameObject carries the character spawn service, which learns every discovered archetype (see GetSpawnService()).
Namespace: Serenity.Character.Installation.Installers
Assembly: Serenity.UnityCharacter.Installation.dll
Syntax
public class UnityCharacterInstaller : CharacterInstaller, IFoundationInstaller, IInstaller
Constructors
UnityCharacterInstaller()
Declaration
public UnityCharacterInstaller()
Methods
GetSpawnService()
Gets the spawn service every character is instantiated and pooled through, already registered with every archetype Install(ILogService) discovered, keyed by Id.
Declaration
public ICharacterSpawnService GetSpawnService()
Returns
| Type | Description |
|---|---|
| ICharacterSpawnService | The spawn service, or null before Install(ILogService) runs. |
Install(ILogService)
Installs the Character service by creating the Unity MonoBehaviour implementation. Auto-discovers character ScriptableObjects via Addressables label CHARACTER.
Config precedence: Inspector-assigned configs are applied first during
InitializeService. If label-based discovery yields > 0 assets, they
override the inspector configs via SetCharacterConfigs.
Declaration
public override void Install(ILogService logService)
Parameters
| Type | Name | Description |
|---|---|---|
| ILogService | logService | The logging service for diagnostic output. |