Interface IGameSettingsAssetPreloader
Namespace: Serenity.GameSettings.Application.Interfaces
Assembly: Serenity.Global.Application.dll
Syntax
public interface IGameSettingsAssetPreloader
Methods
AnalyzeAndPreloadMenuAsync(string, object[])
Analyzes a menu and preloads assets for all options.
Declaration
Task AnalyzeAndPreloadMenuAsync(string menuId, object[] options)
Parameters
| Type | Name | Description |
|---|---|---|
| string | menuId | Menu identifier. |
| object[] | options | Array of options in the menu. |
Returns
| Type | Description |
|---|---|
| Task |
Initialize(object, IGameSettingsService, ILogService)
Initializes the preloader with required dependencies.
Declaration
void Initialize(object assetPrefetcher, IGameSettingsService gameSettingsService, ILogService logService)
Parameters
| Type | Name | Description |
|---|---|---|
| object | assetPrefetcher | Asset prefetcher service (infrastructure-dependent). |
| IGameSettingsService | gameSettingsService | Game settings service for menu configuration. |
| ILogService | logService | Logging service for diagnostics and tracing. |
ReleaseMenuAssets(string)
Releases all preloaded assets related to a specific menu.
Declaration
void ReleaseMenuAssets(string menuId)
Parameters
| Type | Name | Description |
|---|---|---|
| string | menuId | Menu identifier. |
TriggerManualMenuAnalysis(string)
Declaration
void TriggerManualMenuAnalysis(string menuId)
Parameters
| Type | Name | Description |
|---|---|---|
| string | menuId |
UpdateSelectionPreloadAsync(string, int, object[])
Declaration
Task UpdateSelectionPreloadAsync(string menuId, int selectedIndex, object[] options)
Parameters
| Type | Name | Description |
|---|---|---|
| string | menuId | |
| int | selectedIndex | |
| object[] | options |
Returns
| Type | Description |
|---|---|
| Task |