Class UniVRM10AvImporter
Imports VRM avatars using UniVRM10.
public class UniVRM10AvImporter : IAvImporter
- Inheritance
-
objectUniVRM10AvImporter
- Implements
Fields
CanLoadVrm0X
If true, VRM-0.x models are converted to VRM-1.0 and loaded. The components attached to the VRM-0.x model are different. (default: true)
public bool CanLoadVrm0X
Field Value
- bool
ControlRigGenerationOption
ControlRig generation settings. (default: ControlRigGenerationOption.Generate)
public ControlRigGenerationOption ControlRigGenerationOption
Field Value
- ControlRigGenerationOption
ImporterContextSettings
Optional importer settings.
public ImporterContextSettings? ImporterContextSettings
Field Value
- ImporterContextSettings?
MaterialGenerator
Optional material generator.
public IMaterialDescriptorGenerator? MaterialGenerator
Field Value
- IMaterialDescriptorGenerator?
ShowMeshes
Should all mesh renderers be enabled on load? (default: true)
public bool ShowMeshes
Field Value
- bool
SpringboneRuntime
Optional runtime selection for SpringBones.
public IVrm10SpringBoneRuntime? SpringboneRuntime
Field Value
- IVrm10SpringBoneRuntime?
TextureDeserializer
Optional texture deserialization.
public ITextureDeserializer? TextureDeserializer
Field Value
- ITextureDeserializer?
UpdateType
Update type of the loaded avatar.
public Vrm10Instance.UpdateTypes UpdateType
Field Value
- UpdateTypes
VRMMetaInformationCallback
Optional callback called on VRM-0x to VRM-1.0 migration.
public Vrm10.VrmMetaInformationCallback? VRMMetaInformationCallback
Field Value
- Vrm10.VrmMetaInformationCallback?
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