AchEngineInstaller
AchEngineInstaller defines service registrations for an AchEngineScope.
IServiceBuilder API
1. Write an installer
2. Register it on AchEngineScope
Create an empty GameObject, add AchEngineScope, and add the GameInstaller component to its Installers array.
3. Use services
[Inject] (requires VContainer)
ServiceLocator (available anywhere)
Scope lifetime
AchEngineScope builds the container in Awake and disposes it in OnDestroy. A scope created in a scene therefore owns the services registered by that scene.
Relationship with ServiceLocator
ServiceLocator points to the most recently initialized scope. When that scope is destroyed, the locator is cleared or replaced by the next active scope.
Multi-scene note
Use one persistent scope for global services and separate additive scopes for scene-specific services. Do not replace a global scope accidentally when loading another scene.