Table of Contents

Class LunyAssetServiceBase

Namespace
Luny.Engine.Services
/
Assembly
Luny.dll
public abstract class LunyAssetServiceBase : LunyEngineServiceBase, ILunyAssetService, ILunyEngineService
Expand Details ...
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

Type Name Description
LunyAssetPath
path

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

Type Name Description
LunyAssetPath
path

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

Type Name Description
LunyAssetPath
path

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

Type Name Description
LunyAssetId
id

The internal asset ID.

UnloadAsset(ILunyAsset)

Engine-native implementation of asset unloading.

protected abstract void UnloadAsset(ILunyAsset asset)

Parameters

Type Name Description
ILunyAsset
asset