Namespace TriLibCore.Mappers
Classes
AnimatorOverrideAnimationClipMapper
Provides a mechanism for applying an AnimatorOverrideController to the animator of a loaded model while processing animation clips. This mapper is designed to work with Animator Override Controllers, allowing you to override default animation clips with custom ones.
AutodeskInteractiveStandardMaterialMapper
A specialized StandardMaterialMapper that converts TriLib virtual materials into Autodesk Interactive materials. This mapper adjusts the material presets based on the currently active render pipeline (HDRP, URP, or Standard), and it forces the use of a Shader Variant Collection.
ByBonesRootBoneMapper
Implements a root bone selection strategy by scanning a list of bones (Transform components) and choosing the one with the greatest number of child transforms. This mapper is useful when the asset hierarchy does not provide a clear root bone from naming conventions alone.
ByNameAnimatorOverrideAnimationClipMapper
Implements an AnimatorOverrideAnimationClipMapper that maps animation clips by matching their names to those defined in an Animator Override Controller. This mapper uses a configurable string comparison mode and a case-insensitivity option to determine if a loaded animation clip matches a key in the override controller.
ByNameHumanoidAvatarMapper
Implements a humanoid avatar mapping strategy by matching the names of loaded GameObjects with candidate bone names specified in a bone mapping list. For each human bone defined in the mapping, the first matching GameObject found in the model hierarchy is used. If a required bone is not found, a warning is issued.
ByNameLipSyncMapper
Provides a lip sync mapping strategy by searching for viseme matches in blend‐shape key names. This mapper searches through candidate names specified in VisemeCandidates and compares them with the names of blend‐shape keys found in the model's geometry. If a match is found (using the configured string comparison options), the corresponding blend‐shape key index is returned.
ByNameRootBoneMapper
Implements a root bone selection strategy by searching for a matching bone name within the loaded model’s hierarchy. This mapper iterates over a predefined list of candidate root bone names (e.g., "Hips", "Bip01", "Pelvis") and returns the first match found based on the configured string comparison settings.
FilePickerExternalDataMapper
Provides an external data mapping strategy for file picker–based workflows.
This mapper searches through a collection of file items (each with an associated stream)
to find one whose short filename matches the given originalFilename
.
If a match is found, the file’s stream is returned, along with its full name as the final path.
FilePickerTextureMapper
Provides functionality to load textures from a file picker selection. This mapper searches through the list of ItemWithStream objects (provided in the custom context data) to find a file whose short filename matches the filename specified in the TriLib TriLibCore.Interfaces.ITexture. If a match is found, it opens the corresponding data stream.
PerFilenameTextureMapper
Provides a texture mapping strategy which attempts to locate an external texture file whose name matches the filename of the source model. The search is performed in the directory where the model file is located.
SimpleAnimationPlayerAnimationClipMapper
Implements an TriLibCore.Mappers.AnimationClipMapper that creates a SimpleAnimationPlayer for playing animation clips by index or name. When the animation type is set to Generic or Humanoid, and at least one animation clip is available, this mapper adds a SimpleAnimationPlayer to the model's root GameObject and assigns the animation clips to it.
StandardMaterialMapper
Converts TriLib virtual materials into Unity Standard materials. This mapper is designed to work with the Unity Standard shader and processes texture maps and various material properties (e.g., diffuse, glossiness, metallic, emission, normal, occlusion, and displacement) using an asynchronous coroutine pipeline.
ZipFileExternalDataMapper
Provides an external data mapping strategy for extracting data from Zip files.
This mapper searches through the entries of a Zip file (provided via custom context data)
for an entry whose short filename matches the specified originalFilename
.
If a match is found, it opens a stream for that Zip entry.
ZipFileTextureMapper
Provides a texture mapping strategy for extracting texture data from Zip files. This mapper retrieves a Zip file from the custom context data and iterates through its entries, comparing their names to the texture's filename. If a matching file is found, its stream is opened and assigned to the texture loading context.
glTF2StandardMaterialMapper
Converts TriLib virtual materials of glTF2 assets into Unity Standard materials, using shader properties and material presets appropriate for the currently active render pipeline.