Class LoadedUniGLTFAv
A loaded UniGLTF glTF avatar.
public class LoadedUniGLTFAv : LoadedAv, IMeshBlendShapeProvider, IBlendShapeProvider, ICapability
- Inheritance
-
objectLoadedUniGLTFAv
- Implements
- Inherited Members
- Extension Methods
Constructors
LoadedUniGLTFAv(GameObject, RuntimeGltfInstance, AvMetadata, Texture2D?, Texture2D?, Type)
public LoadedUniGLTFAv(GameObject gameObject, RuntimeGltfInstance gltfInstance, AvMetadata metadata, Texture2D? fullRender, Texture2D? bustRender, Type importerType)
Parameters
gameObjectGameObjectgltfInstanceRuntimeGltfInstancemetadataAvMetadatafullRenderTexture2D?bustRenderTexture2D?importerTypeType
Fields
GLTFInstance
The glTF avatar.
public readonly RuntimeGltfInstance GLTFInstance
Field Value
- RuntimeGltfInstance
Properties
ChannelNames
Case-sensitive keys for all available blend weights.
public IReadOnlyCollection<string> ChannelNames { get; }
Property Value
- IReadOnlyCollection<string>
HasWeights
Does this avatar have any blendshape weights?
public bool HasWeights { get; }
Property Value
- bool
Methods
GetWeight(string)
Gets the weight for the given name.
public float GetWeight(string name)
Parameters
namestring
Returns
- float
Remarks
If multiple blend shape sources in the avatar have the same channel name, this gets the maximum weight.
HasWeight(string)
Checks if a weight channel with the given name exists.
public bool HasWeight(string name)
Parameters
namestring
Returns
- bool
ImporterSpecificDispose()
protected override void ImporterSpecificDispose()
SetWeight(string, float)
Sets the weight for the given name.
public void SetWeight(string name, float weight)
Parameters
namestringweightfloat
Remarks
If multiple blend shape sources in the avatar have the same channel name, this sets the weight for all of them.
TryGetAvatarMaterials()
Tries to get all materials of the avatar.
public override IReadOnlyList<Material>? TryGetAvatarMaterials()
Returns
- IReadOnlyList<Material>
TryGetAvatarMeshes()
Tries to get all meshes of the avatar.
public override IReadOnlyList<Mesh>? TryGetAvatarMeshes()
Returns
- IReadOnlyList<Mesh>
TryGetAvatarRenderers()
Tries to get all renderers of the avatar.
public override IReadOnlyList<Renderer>? TryGetAvatarRenderers()
Returns
- IReadOnlyList<Renderer>