MetaAssetList<TAsset, TMeta> Class

Summary

A Weaver.LazyAssetList`1 that serializes a specific type of meta-data about the listed assets so that the data can be accessed and evaluated without actually loading the assets.
Assembly
Weaver.dll
Namespace
Weaver
Interfaces
Base Types
Derived Types
graph BT Type-->Base0["LazyAssetList<TAsset>"] Base0-->Base1["AssetList"] click Base1 "/weaver/api/Weaver/AssetList" Base1-->Base2["AssetListBase"] click Base2 "/weaver/api/Weaver/AssetListBase" Base2-->Base3["ScriptableObject"] Type-.->Interface0["WeaverWindow.IItem"] Type-.->Interface1["IAssetList<TAsset>"] Type-.->Interface2["IEnumerable<TAsset>"] Type["MetaAssetList<TAsset, TMeta>"] class Type type-node Derived0["ItemList"]-->Type click Derived0 "/weaver/api/Weaver/ItemList"

Syntax

public abstract class MetaAssetList<TAsset, TMeta> : LazyAssetList<TAsset>, WeaverWindow.IItem, 
    IAssetList<TAsset>, IEnumerable<TAsset>
    where TAsset : Object

Type Parameters

Name Description
TAsset
TMeta

Properties

Name Value Summary
Directory DefaultAsset
[Editor-Only] The directory from which this list will gather assets.
Inherited from AssetList
MetaDataType Type
The type of meta data in this list.
Recursive bool
[Editor-Only] If true: this list will gather assets in any sub-directories as well as the target directory.
Inherited from AssetList
Tooltip string
[Editor-Only] The text to use to describe this list when showing a tooltip in the Weaver.Editor.Window.WeaverWindow.
Inherited from AssetListBase

Methods

Name Value Summary
GatherAssets() void
[Editor-Only] Gathers all assets in the target Weaver.AssetList.Directory and stores their resource paths in the serialized Weaver.LazyAssetList`1._Paths list.
GatherAssets<T>(List<T>) void
[Editor-Only] Gathers all assets in the target Weaver.AssetListBase.Directory into the `assets` list.
Inherited from AssetListBase
GatherAssets<T>(List<T>, string, bool) void
[Editor-Only] Gathers all assets in the target Weaver.AssetListBase.Directory into the `assets` list.
Inherited from AssetListBase
static
GatherAssetsIfDirty() void
[Editor-Only] Gathers the assets in the target Weaver.AssetListBase.Directory if they might have changed since this method was last called.
Inherited from AssetListBase
GatherResources<T>(List<string>, List<T>) void
[Editor-Only] Gathers all assets and their resource paths in the target Weaver.AssetListBase.Directory.
Inherited from AssetListBase
GetAndVerifyDirectoryPath() string
[Editor-Only] Returns the path of the target Weaver.AssetListBase.Directory relative to the project root or null if a valid folder isn't assigned.
Inherited from AssetListBase
GetMetaData(int) TMeta
Returns the meta-data of the asset at the specified index.
GetRandomIndex() int
Returns a random index in this list.
Inherited from AssetListBase
GetSortedIndices(IComparer<TMeta>) int[]
Returns an array of indicies indicating the sorted order of items in this list based on the `comparer`.
GetSortedIndices(int[], IComparer<TMeta>) void
Outputs an array of indicies indicating the sorted order of items in this list based on the `comparer`.
OnDisable() void
[Editor-Only] Called by Unity when this list is unloaded. Ensures that all assets in the target Weaver.AssetListBase.Directory are gathered so they can be serialized.
Inherited from AssetListBase
OnEnable() void
[Editor-Only] Ensures that this list is in the global collection of all lists so it can be displayed in the Weaver Window and can show project window overlays on its target assets.
Inherited from AssetListBase
Reset() void
[Editor-Only] Assigns the currently selected object as the Weaver.AssetListBase.Directory if possible.
Inherited from AssetListBase
SetListTypes(Type, Type, Type) void
[Editor-Only] Assigns the list types that need to be defined outside this assembly so they c an be used internally.
Inherited from AssetListBase
static