Class GltfImporter
public class GltfImporter : IResourceImporterWithReporter, IResourceImporter
- Inheritance
-
GltfImporter
- Implements
- Inherited Members
Properties
AllowDownload
public bool AllowDownload { get; set; }
Property Value
ImporterExtensions
The file extensions for this resource importer.
public IEnumerable<string> ImporterExtensions { get; }
Property Value
ImporterMimeTypes
The mime types for this resource importer.
public IEnumerable<string> ImporterMimeTypes { get; }
Property Value
ResourceSystem
Set the resource system for this importer.
public ResourceSystem ResourceSystem { set; }
Property Value
Methods
Import(Stream, EcsContainer?, string?)
Begins importing a resource in the given stream into the given ECS context.
public Task<ResourceResult> Import(Stream source, EcsContainer? parent = null, string? fileName = null)
Parameters
source
StreamThe resource source stream.
parent
EcsContainerThe parent node for file types that contain a node hierarchy. If null, hierarchy is loaded into the root node.
fileName
stringBase name of the file.
Returns
- Task<ResourceResult>
A task that returns a reference to all the resources in the file.
Import(Stream, IProcessReporter, EcsContainer?, string?)
public Task<ResourceResult> Import(Stream source, IProcessReporter reporter, EcsContainer? parent = null, string? fileName = null)
Parameters
source
Streamreporter
IProcessReporterparent
EcsContainerfileName
string
Returns
IsImportable(ReadOnlySpan<byte>, string?)
Checks if this importer could import a stream with the given start bytes.
public bool IsImportable(ReadOnlySpan<byte> page, string? fileName = null)
Parameters
page
ReadOnlySpan<byte>The start bytes of the resource stream.
fileName
stringThe name of the file, as a hint.
Returns
- bool
True if the importer could import this file.