Table of Contents

Class AvFlow

Namespace
Uralstech.AvLoader

Class supporting a complete avatar loader flow with fallbacks for each step.

public class AvFlow
Inheritance
object
AvFlow

Constructors

AvFlow(IReadOnlyList<IAvDataLoader>, IReadOnlyList<IAvImporter>)

public AvFlow(IReadOnlyList<IAvDataLoader> dataLoaders, IReadOnlyList<IAvImporter> importers)

Parameters

dataLoaders IReadOnlyList<IAvDataLoader>
importers IReadOnlyList<IAvImporter>

Fields

AsyncPostProcessors

Async post-processors to run after loading the avatar.

public IEnumerable<IAsyncAvPostProcessor> AsyncPostProcessors

Field Value

IEnumerable<IAsyncAvPostProcessor>

DataLoaders

The loaders to use in the flow, in priority order.

public readonly IReadOnlyList<IAvDataLoader> DataLoaders

Field Value

IReadOnlyList<IAvDataLoader>

Remarks

Index 0 is used first; if it cannot handle the data, the flow falls back to index 1, then 2, and so on.

Importers

The importers to use in the flow, in priority order.

public readonly IReadOnlyList<IAvImporter> Importers

Field Value

IReadOnlyList<IAvImporter>

Remarks

Index 0 is used first; if it cannot handle the model format, the flow falls back to index 1, then 2, and so on.

PostProcessors

Post-processors to run after loading the avatar.

public IEnumerable<IAvPostProcessor> PostProcessors

Field Value

IEnumerable<IAvPostProcessor>

Methods

RunAsync(CancellationToken)

Runs the loader flow completely.

public Awaitable<LoadedAv> RunAsync(CancellationToken token = default)

Parameters

token CancellationToken

Returns

Awaitable<LoadedAv>

The loaded avatar.

TryRunAsync(CancellationToken)

Tries to run the loader flow completely.

public Awaitable<LoadedAv?> TryRunAsync(CancellationToken token = default)

Parameters

token CancellationToken

Returns

Awaitable<LoadedAv>

The loaded avatar if the entire flow completed successfully; null otherwise.