Table of Contents

Class AssetStoreRegistration

Namespace
Shard.Assets.Typed
Assembly
Shard.Assets.dll

One module-owned typed asset store and its direct pipeline callbacks.

public sealed record AssetStoreRegistration : IEquatable<AssetStoreRegistration>
Inheritance
AssetStoreRegistration
Implements
Inherited Members

Properties

Store

public AssetTypeInfo Store { get; }

Property Value

AssetTypeInfo

Methods

FixedJsonArray<T>(AssetTypeDefinition<T>, Func<T, string>)

Loads one JSON array from an exact asset pack path and publishes its elements by key.

public static AssetStoreRegistration FixedJsonArray<T>(AssetTypeDefinition<T> definition, Func<T, string> keySelector) where T : notnull

Parameters

definition AssetTypeDefinition<T>
keySelector Func<T, string>

Returns

AssetStoreRegistration

Type Parameters

T

Rooted<T>(AssetTypeDefinition<T>, bool, IEnumerable<string>?, IEnumerable<string>?, IEnumerable<AssetPreload<T>>?, ValidateTypedAssets<T>?, ResolveTypedAssets<T>?, BuildTypedAssetPacket<T>?, IReadOnlyDictionary<string, IReadOnlyList<string>>?)

Loads ordinary assets stored one per file through their generated parent, tag, and containment rules.

public static AssetStoreRegistration Rooted<T>(AssetTypeDefinition<T> definition, bool indexed = false, IEnumerable<string>? loadsAfter = null, IEnumerable<string>? reserved = null, IEnumerable<AssetPreload<T>>? preloads = null, ValidateTypedAssets<T>? validate = null, ResolveTypedAssets<T>? resolve = null, BuildTypedAssetPacket<T>? buildPacket = null, IReadOnlyDictionary<string, IReadOnlyList<string>>? preferredSourcePaths = null) where T : notnull

Parameters

definition AssetTypeDefinition<T>
indexed bool
loadsAfter IEnumerable<string>
reserved IEnumerable<string>
preloads IEnumerable<AssetPreload<T>>
validate ValidateTypedAssets<T>
resolve ResolveTypedAssets<T>
buildPacket BuildTypedAssetPacket<T>
preferredSourcePaths IReadOnlyDictionary<string, IReadOnlyList<string>>

Maps asset keys to preferred paths relative to the store, with the selected path first followed by alternatives that may be ignored.

Returns

AssetStoreRegistration

Type Parameters

T

Rooted<T>(AssetDefinitionBinding<T>, bool, IEnumerable<string>?, IEnumerable<string>?, IEnumerable<AssetPreload<T>>?, ValidateTypedAssets<T>?, ResolveTypedAssets<T>?, BuildTypedAssetPacket<T>?, ContributeDerivedAssets<T>?, IReadOnlyDictionary<string, IReadOnlyList<string>>?)

Registers a generated rooted family before its binding host publishes the runtime definition.

public static AssetStoreRegistration Rooted<T>(AssetDefinitionBinding<T> definition, bool indexed = false, IEnumerable<string>? loadsAfter = null, IEnumerable<string>? reserved = null, IEnumerable<AssetPreload<T>>? preloads = null, ValidateTypedAssets<T>? validate = null, ResolveTypedAssets<T>? resolve = null, BuildTypedAssetPacket<T>? buildPacket = null, ContributeDerivedAssets<T>? contribute = null, IReadOnlyDictionary<string, IReadOnlyList<string>>? preferredSourcePaths = null) where T : notnull

Parameters

definition AssetDefinitionBinding<T>
indexed bool
loadsAfter IEnumerable<string>
reserved IEnumerable<string>
preloads IEnumerable<AssetPreload<T>>
validate ValidateTypedAssets<T>
resolve ResolveTypedAssets<T>
buildPacket BuildTypedAssetPacket<T>
contribute ContributeDerivedAssets<T>
preferredSourcePaths IReadOnlyDictionary<string, IReadOnlyList<string>>

Maps asset keys to preferred paths relative to the store, with the selected path first followed by alternatives that may be ignored.

Returns

AssetStoreRegistration

Type Parameters

T