Interface IGameSettingsAssetPreloaderFactory
Factory contract for creating and configuring UnityGameSettingsAssetPreloader instances.
Incluye creación simple, creación con integrador y validación de dependencias.
Namespace: Serenity.GameSettings.Domain.Interfaces
Assembly: Serenity.Global.Application.dll
Syntax
public interface IGameSettingsAssetPreloaderFactory
Methods
Create(IFoundationViewElement, ILogService, object, IGameSettingsService)
Creates a fully configured UnityGameSettingsAssetPreloader instance.
Declaration
IGameSettingsAssetPreloader Create(IFoundationViewElement host, ILogService logService, object assetPrefetcher = null, IGameSettingsService gameSettingsService = null)
Parameters
| Type | Name | Description |
|---|---|---|
| IFoundationViewElement | host | Container/host view element to attach the preloader to. |
| ILogService | logService | Logging service for diagnostics. |
| object | assetPrefetcher | Asset prefetcher service (optional - will resolve if null). |
| IGameSettingsService | gameSettingsService | Game settings service (optional - will resolve if null). |
Returns
| Type | Description |
|---|---|
| IGameSettingsAssetPreloader | Configured preloader instance. |
CreateForMenu(IFoundationViewElement, string, ILogService)
Creates a preloader instance specifically for a menu system.
Designed to attach preloading directly to a menu identified by menuId.
Declaration
IGameSettingsAssetPreloader CreateForMenu(IFoundationViewElement host, string menuId, ILogService logService)
Parameters
| Type | Name | Description |
|---|---|---|
| IFoundationViewElement | host | Container/host view element to attach the preloader to. |
| string | menuId | Identifier for the menu system. |
| ILogService | logService | Logging service for diagnostics. |
Returns
| Type | Description |
|---|---|
| IGameSettingsAssetPreloader | Configured preloader tailored for the specific menu. |
CreateWithIntegration(IFoundationViewElement, ILogService)
Creates a complete progressive preloading system with integration components.
Returns preloader + integrator already connected to the host.
Declaration
(IGameSettingsAssetPreloader preloader, IGameSettingsAssetPreloadingIntegrator integrator) CreateWithIntegration(IFoundationViewElement host, ILogService logService)
Parameters
| Type | Name | Description |
|---|---|---|
| IFoundationViewElement | host | Container/host view element to attach the components to. |
| ILogService | logService | Logging service for diagnostics. |
Returns
| Type | Description |
|---|---|
| (IGameSettingsAssetPreloader preloader, IGameSettingsAssetPreloadingIntegrator integrator) | Configured system with preloader and integrator. |
ValidateDependencies()
Validates that all required services are available for proper system operation.
Declaration
bool ValidateDependencies()
Returns
| Type | Description |
|---|---|
| bool | True if all dependencies can be resolved, false otherwise. |