Class GltfImport
Loads a glTF's content, converts it to Unity resources and is able to feed it to an IInstantiator for instantiation. Uses the powerful Newtonsoft JSON and flexible Root schema class for JSON de-serialization.
Inherited Members
Namespace: GLTFast.Newtonsoft
Assembly: solution.dll
Syntax
public class GltfImport : GltfImportBase<Root>, IDisposable, IGltfReadable<Root>, IGltfReadable
Constructors
GltfImport(IDownloadProvider, IDeferAgent, IMaterialGenerator, ICodeLogger)
Declaration
public GltfImport(IDownloadProvider downloadProvider = null, IDeferAgent deferAgent = null, IMaterialGenerator materialGenerator = null, ICodeLogger logger = null)
Parameters
Type | Name | Description |
---|---|---|
IDownloadProvider | downloadProvider | |
IDeferAgent | deferAgent | |
IMaterialGenerator | materialGenerator | |
ICodeLogger | logger |
Methods
ParseJson(string)
De-serializes a glTF JSON string and returns the glTF root schema object.
Declaration
protected override RootBase ParseJson(string json)
Parameters
Type | Name | Description |
---|---|---|
string | json | glTF JSON |
Returns
Type | Description |
---|---|
RootBase | De-serialized glTF root object. |