Class GltfImportBase<TRoot>
Loads a glTF's content, converts it to Unity resources and is able to feed it to an IInstantiator for instantiation.
Inherited Members
Namespace: GLTFast
Assembly: solution.dll
Syntax
public abstract class GltfImportBase<TRoot> : GltfImportBase, IDisposable, IGltfReadable<TRoot>, IGltfReadable where TRoot : RootBase
Type Parameters
Name | Description |
---|---|
TRoot | Root schema class to use for de-serialization. |
Constructors
GltfImportBase(IDownloadProvider, IDeferAgent, IMaterialGenerator, ICodeLogger)
Constructs a GltfImport instance with injectable customization objects.
Declaration
public GltfImportBase(IDownloadProvider downloadProvider = null, IDeferAgent deferAgent = null, IMaterialGenerator materialGenerator = null, ICodeLogger logger = null)
Parameters
Type | Name | Description |
---|---|---|
IDownloadProvider | downloadProvider | Provides file access or download customization |
IDeferAgent | deferAgent | Provides custom update loop behavior for better frame rate control |
IMaterialGenerator | materialGenerator | Provides custom glTF to Unity material conversion |
ICodeLogger | logger | Provides custom message logging |
Properties
Root
Main glTF data structure
Declaration
protected override RootBase Root { get; set; }
Property Value
Type | Description |
---|---|
RootBase |
Overrides
Methods
GetSourceRoot()
Get source root (de-serialized glTF JSON). This is intended for read-only access. Changes might corrupt data and break subsequent scene instantiation.
Declaration
public TRoot GetSourceRoot()
Returns
Type | Description |
---|---|
TRoot | De-serialized glTF root object |