API Reference · Model and texture loading

GltfLoadOptions

Namespace: Ava3D

public sealed class GltfLoadOptions

How GltfAsset.LoadAsync reads a file.

Properties

MemberDescription
static GltfLoadOptions Default { get; }

The defaults: no resolver, tolerant, unnamed.

string Name { get; set; }

The name for the root node of every instance, when the file's own name is not wanted.

IGltfResourceResolver Resolver { get; set; }

Where a .gltf's external buffers and images come from. Null reads only what is in the bytes given — a .glb, or a .gltf with data: URIs — and records anything external as an GltfDiagnosticKind.UnresolvedBuffer or GltfDiagnosticKind.UnresolvedImage. Loading from a Uri picks one from the scheme when this is left null.

bool Validate { get; set; }

Throw a GltfException listing the GltfDiagnostics rather than load what could be read. Off by default: a model with one bad accessory is worth having, and the diagnostics say what is missing. On for a pipeline that would rather fail a build than ship a model with a hole in it.

See also