Class GLTFastAvImporter
Imports glTF avatars using glTFast.
public class GLTFastAvImporter : IAvImporter
- Inheritance
-
objectGLTFastAvImporter
- Implements
Fields
DeferAgent
Optional custom glTFast defer agent.
public IDeferAgent? DeferAgent
Field Value
- IDeferAgent?
DownloadProvider
Optional custom glTFast download provider.
public IDownloadProvider? DownloadProvider
Field Value
- IDownloadProvider?
ImportSettings
Optional custom glTFast ImportSettings.
public ImportSettings? ImportSettings
Field Value
- ImportSettings?
InstantiationSettings
Optional custom glTFast InstantiationSettings.
public InstantiationSettings? InstantiationSettings
Field Value
- InstantiationSettings?
InstantiatorFactory
Optional factory for custom glTFast GameObjectInstantiators.
public Func<GltfImport, GameObject, Awaitable<GameObjectInstantiator>>? InstantiatorFactory
Field Value
- Func<GltfImport, GameObject, Awaitable<GameObjectInstantiator>>
Logger
Optional custom glTFast logger.
public ICodeLogger? Logger
Field Value
- ICodeLogger?
MaterialGenerator
Optional custom glTFast material generator.
public IMaterialGenerator? MaterialGenerator
Field Value
- IMaterialGenerator?
Methods
ImportAvatarAsync(AvSourceData, bool, CancellationToken)
Tries to import the avatar into a scene as a disabled GameObject, along with metadata and any renders.
public Awaitable<LoadedAv?> ImportAvatarAsync(AvSourceData rawData, bool throwOnFail, CancellationToken token = default)
Parameters
rawDataAvSourceDataThe raw avatar data to process.
throwOnFailboolShould this method throw errors on failures or log them as warnings and return null?
tokenCancellationToken
Returns
Remarks
The returned LoadedAv may contain code to handle requirements of format-supporting plugins. For example, GLTFastAvImporter depends on glTFast, which requires that GltfImport object used to import the avatar be active alongside the avatar's GameObject, and should be disposed after the avatar is no longer needed. Thus, LoadedAv implements System.IDisposable.
SupportsFormat(AvModelFileExtension)
public bool SupportsFormat(AvModelFileExtension format)
Parameters
formatAvModelFileExtension
Returns
- bool