Class UnityAssetPrefetcherServiceFactory
Factory for creating Unity-specific asset prefetcher service instances.
Creates GameObject-based services with proper component initialization.
Implements
Inherited Members
Namespace: Serenity.AssetPrefetcher.Infrastructure.Services
Assembly: Serenity.UnityAssetPrefetcher.Infrastructure.dll
Syntax
public class UnityAssetPrefetcherServiceFactory : IAssetPrefetcherServiceFactory
Constructors
UnityAssetPrefetcherServiceFactory()
Declaration
public UnityAssetPrefetcherServiceFactory()
Methods
CreateService(PrefetchProfile, IAssetKeyResolver, string)
Creates a new asset prefetcher service instance as a Unity GameObject component.
Declaration
public IAssetPrefetcherService CreateService(PrefetchProfile profile, IAssetKeyResolver keyResolver = null, string name = "AssetPrefetcherService")
Parameters
| Type | Name | Description |
|---|---|---|
| PrefetchProfile | profile | Prefetch profile configuration for the service |
| IAssetKeyResolver | keyResolver | Optional asset key resolver for key transformation |
| string | name | Name for the created GameObject |
Returns
| Type | Description |
|---|---|
| IAssetPrefetcherService | Initialized asset prefetcher service instance |
CreateService(PrefetchProfile, IAssetKeyResolver, Transform, string)
Creates a new asset prefetcher service instance with parent transform assignment.
Convenience overload specific to infrastructure layer (not part of domain interface).
Declaration
public IAssetPrefetcherService CreateService(PrefetchProfile profile, IAssetKeyResolver keyResolver, Transform parent, string name = "AssetPrefetcherService")
Parameters
| Type | Name | Description |
|---|---|---|
| PrefetchProfile | profile | Prefetch profile configuration for the service |
| IAssetKeyResolver | keyResolver | Asset key resolver for key transformation |
| Transform | parent | Parent transform for the created GameObject |
| string | name | Name for the created GameObject |
Returns
| Type | Description |
|---|---|
| IAssetPrefetcherService | Initialized asset prefetcher service instance with parent assignment |