Table of Contents

Class LunyAssetServiceBase

Namespace
Luny.Engine.Services
Assembly
Luny.dll
public abstract class LunyAssetServiceBase : LunyEngineServiceBase, ILunyAssetService, ILunyEngineService
Inheritance
object
LunyAssetServiceBase
Implements
Derived
Inherited Members

Constructors

LunyAssetServiceBase()

protected LunyAssetServiceBase()

Methods

GetExtensionMapping()

Provides the extension mapping for different asset types.

protected abstract IReadOnlyDictionary<Type, string[]> GetExtensionMapping()

Returns

IReadOnlyDictionary<Type, string[]>

GetPlaceholder<T>(LunyAssetPath)

Returns a "Missing Asset" placeholder of the requested type.

protected abstract T GetPlaceholder<T>(LunyAssetPath path) where T : class, ILunyAsset

Parameters

path LunyAssetPath

Returns

T

Type Parameters

T

LoadAsset<T>(LunyAssetPath)

Engine-native implementation of tiered asset lookup.

protected abstract T LoadAsset<T>(LunyAssetPath path) where T : class, ILunyAsset

Parameters

path LunyAssetPath

Returns

T

Type Parameters

T

Load<T>(LunyAssetPath)

Loads an asset of type T by its Luny path.

public T Load<T>(LunyAssetPath path) where T : class, ILunyAsset

Parameters

path LunyAssetPath

The agnostic path to the asset.

Returns

T

The loaded asset bridge, or a "Missing Asset" placeholder if loading fails.

Type Parameters

T

The bridge interface type of the asset (e.g., ILunyPrefab).

Unload(LunyAssetId)

Unloads an asset by its internal ID.

public void Unload(LunyAssetId id)

Parameters

id LunyAssetId

The internal asset ID.

UnloadAsset(ILunyAsset)

Engine-native implementation of asset unloading.

protected abstract void UnloadAsset(ILunyAsset asset)

Parameters

asset ILunyAsset