TriLib  1.8.7f
TriLib Unity Package
TriLib.AssetLoaderBase Class Reference

Base asset loader. More...

Inheritance diagram for TriLib.AssetLoaderBase:
TriLib.AssetLoader TriLib.AssetLoaderAsync TriLib.AssetLoaderZip

Public Member Functions

EmbeddedTextureData LoadTextureData (string path, string basePath)
 Tries to load texture data from the given path, searching from basePath. More...
 
void Dispose ()
 

Static Public Member Functions

static bool IsExtensionSupported (string extension)
 Checks whether the given file extension is supported. More...
 
static string GetSupportedFileExtensions ()
 Returns a string of supported file extensions. More...
 

Static Public Attributes

static ConcurrentList< FileLoadData > FilesLoadData = new ConcurrentList<FileLoadData>()
 Stores a FileLoadData reference list for callbacks. More...
 

Protected Member Functions

void TriggerOnMeshCreated (uint meshIndex, Mesh mesh)
 Triggers the on mesh created event. More...
 
void TriggerOnMaterialCreated (uint materialIndex, bool isOverriden, Material material)
 Triggers the on material created event. More...
 
void TriggerOnTextureLoaded (string sourcePath, Material material, string propertyName, Texture2D texture)
 Triggers the on texture loaded event. More...
 
void TriggerOnAnimationClipCreated (uint animationClipIndex, AnimationClip animationClip)
 Triggers the on animation clip created event. More...
 
void TriggerOnObjectLoaded (GameObject loadedGameObject)
 Triggers the on object loaded event. More...
 
void TriggerOnMetadataProcessed (AssimpMetadataType metadataType, uint metadataIndex, string metadataKey, object metadataValue)
 Triggers the on metadata processed event. More...
 
void TriggerOnBlendShapeKeyCreated (Mesh mesh, string name, Vector3[] vertices, Vector3[] normals, Vector4[] tangents, Vector4[] biTangents)
 Triggers the on blend-shape key created event. More...
 
void InternalLoadFromMemory (byte[] fileBytes, string filename, string basePath, AssetLoaderOptions options=null, bool usesWrapperGameObject=false, AssimpInterop.DataCallback dataCallback=null, AssimpInterop.ExistsCallback existsCallback=null, LoadTextureDataCallback loadTextureDataCallback=null, AssimpInterop.ProgressCallback progressCallback=null, FileLoadData customFileLoadData=null)
 Internally loads a file from memory into its data representation. More...
 
void InternalLoadFromMemoryAndZip (byte[] data, string assetExtension, string basePath, AssetLoaderOptions options=null, bool usesWrapperGameObject=false, AssimpInterop.DataCallback dataCallback=null, AssimpInterop.ExistsCallback existsCallback=null, LoadTextureDataCallback loadTextureDataCallback=null, AssimpInterop.ProgressCallback progressCallback=null)
 Internally loads a model from memory with custom embedded texture loading for ZIP files. More...
 
void InternalLoadFromFile (string filename, string basePath, AssetLoaderOptions options=null, bool usesWrapperGameObject=false, AssimpInterop.ProgressCallback progressCallback=null)
 Internally loads a file from file system into it's data representation. More...
 
GameObject BuildGameObject (AssetLoaderOptions options, string basePath=null, GameObject wrapperGameObject=null)
 Builds the UnityEngine.GameObject from pre-loaded data. More...
 
virtual void SetupSkinnedMeshRendererTransforms (GameObject gameObject)
 Setups the UnityEngine.SkinnedMeshRenderer bone transforms. More...
 
virtual void ProcessMetadata (AssimpMetadata metadata)
 Processes the given metadata by triggering the OnMetadataProcessed event. More...
 
virtual void SetupAnimations (GameObject gameObject, AssetLoaderOptions options)
 Setups animation components and UnityEngine.AnimationClip clips into the given UnityEngine.GameObject. More...
 
virtual GameObject TransformNodeData (NodeData nodeData, AssetLoaderOptions options, GameObject existingGameObject=null)
 Transforms given TriLib.NodeData into a UnityEngine.GameObject. More...
 
virtual void CreateMeshComponents (GameObject gameObject, AssetLoaderOptions options, Mesh mesh, bool hasBoneInfo, Material[] combinedMaterials, IList< string > boneNames=null, Material singleMaterial=null, MeshData meshData=null, string connectionKey=null)
 Creates mesh rendering components into given UnityEngine.GameObject. More...
 
virtual void TransformCameraData (GameObject gameObject, CameraData cameraData, AssetLoaderOptions options)
 Transforms the given TriLib.CameraData into a UnityEngine.Camera. More...
 
virtual void TransformAnimationData (AnimationData animationData, AssetLoaderOptions options, GameObject gameObject)
 Transforms the given TriLib.AnimationData into a UnityEngine.AnimationClip. More...
 
virtual void TransformMeshData (MeshData meshData, AssetLoaderOptions options)
 Transforms the given TriLib.MeshData into a UnityEngine.Mesh. More...
 
virtual void TransformMaterialData (MaterialData materialData, AssetLoaderOptions options, string basePath=null)
 Transforms the given TriLib.MaterialData into a UnityEngine.Material. More...
 
virtual Material LoadMaterial (string name, AssetLoaderOptions options, bool hasAlpha, bool hasSpecular)
 Creates a new UnityEngine.Material or loads an existing UnityEngine.Material with the given name. More...
 
virtual Texture2D LoadTextureFromFile (string path, string name, AssetLoaderOptions options, EmbeddedTextureData embeddedTextureData, TextureWrapMode textureWrapMode, ref bool hasAlphaChannel, bool isNormalMap, bool checkAlphaChannel=false)
 Creates a new UnityEngine.Texture2D or loads an existing UnityEngine.Texture2D with the given path. More...
 
virtual string FixNodeName (string name, uint nodeId)
 Generates a unique node name, if the given name is empty. More...
 
virtual string FixName (string name, uint id)
 Generates a unique name, if the given name is empty. More...
 
virtual string FixName (string name)
 Generates a unique name using GUIDs, if the given name is empty. More...
 
void ReleaseImport ()
 Releases allocated resources. More...
 

Protected Attributes

const string AssimpFilenameMagicString = "$$$___magic___$$$"
 Assimp uses this prefix when loading files from memory. More...
 
NodeData RootNodeData
 Main scene TriLib.NodeData. More...
 
MaterialData [] MaterialData
 Processed TriLib.MaterialData list. More...
 
MeshData [] MeshData
 Processed TriLib.MeshData list. More...
 
AnimationData [] AnimationData
 Processed TriLib.AnimationData list. More...
 
CameraData [] CameraData
 Processed TriLib.CameraData list. More...
 
AssimpMetadata [] Metadata
 Processed TriLib.AssimpMetadata list. More...
 
Dictionary< string, string > NodesPath
 Processed nodes path dictionary. More...
 
Dictionary< string, Material > LoadedMaterials
 Loaded UnityEngine.Material for a given name dictionary. More...
 
Dictionary< string, Texture2D > LoadedTextures
 Loaded UnityEngine.Texture2D for a given name dictionary. More...
 
Dictionary< SkinnedMeshRenderer, IList< string > > LoadedBoneNames
 Loaded bone names for a given UnityEngine.SkinnedMeshRenderer dictionary. More...
 
Dictionary< string, MeshDataMeshDataConnections
 UnityEngine.GameObject and MeshData relationship dictionary used to apply blend-shape animations. More...
 
Dictionary< string, EmbeddedTextureData > EmbeddedTextures
 Loaded EmbeddedTextureData for a given name dictionary. More...
 
uint NodeId
 Used to temporarily store nodes id. More...
 
bool HasBoneInfo
 Used to temporarily indicate if there are any bones assigned to loaded meshes. More...
 
bool HasBlendShapes
 Used to temporarily indicate if there are any blend shapes assigned to loaded meshes. More...
 
IntPtr Scene
 Pointer to Assimp loaded scene. More...
 

Static Protected Attributes

static Material StandardBaseMaterial
 Base Diffuse UnityEngine.Material used to load materials. More...
 
static Material StandardSpecularMaterial
 Base Specular UnityEngine.Material used to load materials. More...
 
static Material StandardBaseAlphaMaterial
 Base Diffuse Alpha UnityEngine.Material used to load materials. More...
 
static Material StandardSpecularAlphaMaterial
 Base Specular Alpha UnityEngine.Material used to load materials. More...
 
static Material StandardBaseCutoutMaterial
 Base Diffuse Cutout UnityEngine.Material used to load materials. More...
 
static Material StandardSpecularCutoutMaterial
 Base Specular Cutout UnityEngine.Material used to load materials. More...
 
static Texture2D NotFoundTexture
 UnityEngine.Texture used to show when no texture is found. More...
 

Properties

bool HasOnMeshCreated [get]
 Gets a value indicating whether this instance has on mesh created event. More...
 
bool HasOnMaterialCreated [get]
 Gets a value indicating whether this instance has on material created event. More...
 
bool HasOnTextureLoaded [get]
 Gets a value indicating whether this instance has on texture loaded event. More...
 
bool HasOnAnimationClipCreated [get]
 Gets a value indicating whether this instance has on animation clip created event. More...
 
bool HasOnObjectLoaded [get]
 Gets a value indicating whether this instance has on object loaded event. More...
 
bool HasOnMetadataProcessed [get]
 Gets a value indicating whether this instance has on metadata processed event. More...
 
bool HasOnBlendShapeKeyCreated [get]
 Gets a value indicating whether this instance has on blend-shape key created event. More...
 

Events

EmbeddedTextureLoadCallback EmbeddedTextureLoad
 Use this field to assign the callback that will be triggered when a texture looks up for embedded data. More...
 
MeshCreatedHandle OnMeshCreated
 Use this field to assign the event that occurs when a mesh is loaded. More...
 
MaterialCreatedHandle OnMaterialCreated
 Use this field to assign the event that occurs when a material is created. More...
 
TextureLoadHandle OnTextureLoaded
 Use this field to assign the event that occurs when a texture is loaded. More...
 
AnimationClipCreatedHandle OnAnimationClipCreated
 Use this field to assign the event that occurs when an animation is created. More...
 
ObjectLoadedHandle OnObjectLoaded
 Use this field to assign the event that occurs when the asset is loaded. More...
 
MetadataProcessedHandle OnMetadataProcessed
 Use this field to assign the event that will occurs when each file metadata is processed. More...
 
BlendShapeKeyCreatedHandle OnBlendShapeKeyCreated
 Use this field to assign the event that occurs when a blend-shape key is created. More...
 

Detailed Description

Base asset loader.

Member Function Documentation

◆ BuildGameObject()

GameObject TriLib.AssetLoaderBase.BuildGameObject ( AssetLoaderOptions  options,
string  basePath = null,
GameObject  wrapperGameObject = null 
)
protected

Builds the UnityEngine.GameObject from pre-loaded data.

Parameters
optionsTriLib.AssetLoaderOptions used to build the UnityEngine.GameObject.
basePathBase path from the loaded file.
wrapperGameObjectWrapper UnityEngine.GameObject to build the object into.
Returns
The built UnityEngine.GameObject.

◆ CreateMeshComponents()

virtual void TriLib.AssetLoaderBase.CreateMeshComponents ( GameObject  gameObject,
AssetLoaderOptions  options,
Mesh  mesh,
bool  hasBoneInfo,
Material []  combinedMaterials,
IList< string >  boneNames = null,
Material  singleMaterial = null,
MeshData  meshData = null,
string  connectionKey = null 
)
protectedvirtual

Creates mesh rendering components into given UnityEngine.GameObject.

Parameters
gameObjectUnityEngine.GameObject to create the components at.
optionsTriLib.AssetLoaderOptions used to create the components.
meshUnityEngine.Mesh to add to the created component.
hasBoneInfoIf true, creates a UnityEngine.SkinnedMeshRenderer, otherwise, creates a UnityEngine.MeshRenderer.
combinedMaterialsUnityEngine.Material list to assign to the created component.
boneNamesBone names loaded for the given component.
singleMaterialSingle UnityEngine.Material to assign to the component.
meshDataMeshData used to store a reference to the created UnityEngine.SkinnedMeshRenderer.
connectionKeyKey used to build a MeshData connection.

◆ Dispose()

void TriLib.AssetLoaderBase.Dispose ( )

◆ FixName() [1/2]

virtual string TriLib.AssetLoaderBase.FixName ( string  name,
uint  id 
)
protectedvirtual

Generates a unique name, if the given name is empty.

Parameters
nameName to check.
idId to generate the unique name.
Returns
Generated name if given name is empty. Otherwise, returns the given name.

◆ FixName() [2/2]

virtual string TriLib.AssetLoaderBase.FixName ( string  name)
protectedvirtual

Generates a unique name using GUIDs, if the given name is empty.

Parameters
nameName to check.
Returns
Generated name if given name is empty. Otherwise, returns the given name.

◆ FixNodeName()

virtual string TriLib.AssetLoaderBase.FixNodeName ( string  name,
uint  nodeId 
)
protectedvirtual

Generates a unique node name, if the given name is empty.

Parameters
nameNode name to check.
nodeIdNode id to use when the node name is empty or when it already exists.
Returns
Generated name if given name is empty. Otherwise, returns the given name.

◆ GetSupportedFileExtensions()

static string TriLib.AssetLoaderBase.GetSupportedFileExtensions ( )
static

Returns a string of supported file extensions.

Returns
Supported file extensions.

◆ InternalLoadFromFile()

void TriLib.AssetLoaderBase.InternalLoadFromFile ( string  filename,
string  basePath,
AssetLoaderOptions  options = null,
bool  usesWrapperGameObject = false,
AssimpInterop.ProgressCallback  progressCallback = null 
)
protected

Internally loads a file from file system into it's data representation.

Parameters
filenameFilename to load.
basePathBase path from the loaded file.
optionsTriLib.AssetLoaderOptions used to load the file.
usesWrapperGameObjectPass true when using a wrapper UnityEngine.GameObject.
progressCallbackCallback used to retrieve file loading percentage.

◆ InternalLoadFromMemory()

void TriLib.AssetLoaderBase.InternalLoadFromMemory ( byte []  fileBytes,
string  filename,
string  basePath,
AssetLoaderOptions  options = null,
bool  usesWrapperGameObject = false,
AssimpInterop.DataCallback  dataCallback = null,
AssimpInterop.ExistsCallback  existsCallback = null,
LoadTextureDataCallback  loadTextureDataCallback = null,
AssimpInterop.ProgressCallback  progressCallback = null,
FileLoadData  customFileLoadData = null 
)
protected

Internally loads a file from memory into its data representation.

Parameters
fileBytesFile data to load.
filenameFilename, in case it doesn't exist, the file extension should be used (eg: ".FBX").
basePathBase path from the loaded file.
optionsTriLib.AssetLoaderOptions used to load the file.
usesWrapperGameObjectPass true when using a wrapper UnityEngine.GameObject.
dataCallbackCustom resource data retrieval callback. Pass this parameter when you need to load external data while loading from memory.
existsCallbackCustom resource size retrieval callback. Pass this parameter when you need to load external data while loading from memory.
loadTextureDataCallbackPass this callback to load texture data from custom sources.
progressCallbackCallback used to retrieve file loading percentage.
customFileLoadDataCustom FileLoadData used to store additional asset source information.

◆ InternalLoadFromMemoryAndZip()

void TriLib.AssetLoaderBase.InternalLoadFromMemoryAndZip ( byte []  data,
string  assetExtension,
string  basePath,
AssetLoaderOptions  options = null,
bool  usesWrapperGameObject = false,
AssimpInterop.DataCallback  dataCallback = null,
AssimpInterop.ExistsCallback  existsCallback = null,
LoadTextureDataCallback  loadTextureDataCallback = null,
AssimpInterop.ProgressCallback  progressCallback = null 
)
protected

Internally loads a model from memory with custom embedded texture loading for ZIP files.

Parameters
dataLoaded file data.
assetExtensionLoaded file extension.
basePathBase path from the loaded file.
optionsTriLib.AssetLoaderOptions used to load the file.
usesWrapperGameObjectPass true when using a wrapper UnityEngine.GameObject.
dataCallbackCustom resource data retrieval callback. Pass this parameter when you need to load external data while loading from memory.
existsCallbackCustom resource size retrieval callback. Pass this parameter when you need to load external data while loading from memory.
loadTextureDataCallbackPass this callback to load texture data from custom sources.
progressCallbackCallback used to retrieve file loading percentage.
Returns

◆ IsExtensionSupported()

static bool TriLib.AssetLoaderBase.IsExtensionSupported ( string  extension)
static

Checks whether the given file extension is supported.

Returns
true, if the extension is supported. Otherwise, false.

◆ LoadMaterial()

virtual Material TriLib.AssetLoaderBase.LoadMaterial ( string  name,
AssetLoaderOptions  options,
bool  hasAlpha,
bool  hasSpecular 
)
protectedvirtual

Creates a new UnityEngine.Material or loads an existing UnityEngine.Material with the given name.

Parameters
nameMaterial name.
optionsTriLib.AssetLoaderOptions used to load the material.
hasAlphaIf true, creates/loads an alpha material.
hasSpecularIf true, creates/loads a specular material.
Returns
The created/loaded UnityEngine.Material.

◆ LoadTextureData()

EmbeddedTextureData TriLib.AssetLoaderBase.LoadTextureData ( string  path,
string  basePath 
)

Tries to load texture data from the given path, searching from basePath.

Parameters
pathTexture relative path.
basePathModel absolute path.
Returns
A new TriLib.EmbeddedTextureData.

◆ LoadTextureFromFile()

virtual Texture2D TriLib.AssetLoaderBase.LoadTextureFromFile ( string  path,
string  name,
AssetLoaderOptions  options,
EmbeddedTextureData  embeddedTextureData,
TextureWrapMode  textureWrapMode,
ref bool  hasAlphaChannel,
bool  isNormalMap,
bool  checkAlphaChannel = false 
)
protectedvirtual

Creates a new UnityEngine.Texture2D or loads an existing UnityEngine.Texture2D with the given path.

Parameters
pathPath to load the texture from.
nameTexture name.
optionsTriLib.AssetLoaderOptions used to load the texture.
embeddedTextureDataTriLib.EmbeddedTextureData to load the texture from.
textureWrapModeUnityEngine.TextureWrapMode to assign to the texture.
hasAlphaChannelChanged to true when the texture has alpha pixels.
isNormalMapIf true, applies special processing to the texture and treat it as a normal map.
checkAlphaChannelIf true, checks for any alpha pixel on loaded texture and assigns the value back to this variable.
Returns
The created/loaded UnityEngine.Texture2D

◆ ProcessMetadata()

virtual void TriLib.AssetLoaderBase.ProcessMetadata ( AssimpMetadata  metadata)
protectedvirtual

Processes the given metadata by triggering the OnMetadataProcessed event.

Parameters
metadataTriLib.AssimpMetadata to process.

◆ ReleaseImport()

void TriLib.AssetLoaderBase.ReleaseImport ( )
protected

Releases allocated resources.

◆ SetupAnimations()

virtual void TriLib.AssetLoaderBase.SetupAnimations ( GameObject  gameObject,
AssetLoaderOptions  options 
)
protectedvirtual

Setups animation components and UnityEngine.AnimationClip clips into the given UnityEngine.GameObject.

Parameters
gameObjectUnityEngine.GameObject to add the component to.
optionsTriLib.AssetLoaderOptions used to process the components.

◆ SetupSkinnedMeshRendererTransforms()

virtual void TriLib.AssetLoaderBase.SetupSkinnedMeshRendererTransforms ( GameObject  gameObject)
protectedvirtual

Setups the UnityEngine.SkinnedMeshRenderer bone transforms.

Parameters
gameObjectUnityEngine.GameObject where the bones will be searched.

◆ TransformAnimationData()

virtual void TriLib.AssetLoaderBase.TransformAnimationData ( AnimationData  animationData,
AssetLoaderOptions  options,
GameObject  gameObject 
)
protectedvirtual

Transforms the given TriLib.AnimationData into a UnityEngine.AnimationClip.

Parameters
animationDataTriLib.AnimationData to be transformed.
optionsTriLib.AssetLoaderOptions used to transform the animation.
gameObjectTransformed UnityEngine.GameObject.

◆ TransformCameraData()

virtual void TriLib.AssetLoaderBase.TransformCameraData ( GameObject  gameObject,
CameraData  cameraData,
AssetLoaderOptions  options 
)
protectedvirtual

Transforms the given TriLib.CameraData into a UnityEngine.Camera.

Parameters
gameObjectUnityEngine.GameObject to add the UnityEngine.Camera component into.
cameraDataTriLib.CameraData to be transformed.
optionsTriLib.AssetLoaderOptions used to transform the camera.

◆ TransformMaterialData()

virtual void TriLib.AssetLoaderBase.TransformMaterialData ( MaterialData  materialData,
AssetLoaderOptions  options,
string  basePath = null 
)
protectedvirtual

Transforms the given TriLib.MaterialData into a UnityEngine.Material.

Parameters
materialDataTriLib.MaterialData to be transformed.
optionsTriLib.AssetLoaderOptions used to transform the material.
basePathLoaded asset base path.

◆ TransformMeshData()

virtual void TriLib.AssetLoaderBase.TransformMeshData ( MeshData  meshData,
AssetLoaderOptions  options 
)
protectedvirtual

Transforms the given TriLib.MeshData into a UnityEngine.Mesh.

Parameters
meshDataTriLib.MeshData to be transformed.
optionsTriLib.AssetLoaderOptions used to transform the mesh.

◆ TransformNodeData()

virtual GameObject TriLib.AssetLoaderBase.TransformNodeData ( NodeData  nodeData,
AssetLoaderOptions  options,
GameObject  existingGameObject = null 
)
protectedvirtual

Transforms given TriLib.NodeData into a UnityEngine.GameObject.

Parameters
nodeDataTriLib.NodeData to be transformed.
optionsTriLib.AssetLoaderOptions used to transform the data.
existingGameObjectused to add the components to instead of adding to a new object.
Returns
The transformed UnityEngine.GameObject.

◆ TriggerOnAnimationClipCreated()

void TriLib.AssetLoaderBase.TriggerOnAnimationClipCreated ( uint  animationClipIndex,
AnimationClip  animationClip 
)
protected

Triggers the on animation clip created event.

Parameters
animationClipIndexAnimation clip index.
animationClipAnimation clip.

◆ TriggerOnBlendShapeKeyCreated()

void TriLib.AssetLoaderBase.TriggerOnBlendShapeKeyCreated ( Mesh  mesh,
string  name,
Vector3 []  vertices,
Vector3 []  normals,
Vector4 []  tangents,
Vector4 []  biTangents 
)
protected

Triggers the on blend-shape key created event.

Parameters
meshUnityEngine.Mesh where the blend-shape key has been created.
nameBlend-shape name
verticesBlend-shape key vertices.
normalsBlend-shape key normals.
tangentsBlend-shape key tangents.
biTangentsBlend-shape key bi-tangents.

◆ TriggerOnMaterialCreated()

void TriLib.AssetLoaderBase.TriggerOnMaterialCreated ( uint  materialIndex,
bool  isOverriden,
Material  material 
)
protected

Triggers the on material created event.

Parameters
materialIndexMaterial index.
isOverridenIf set to true is overriden.
materialMaterial.

◆ TriggerOnMeshCreated()

void TriLib.AssetLoaderBase.TriggerOnMeshCreated ( uint  meshIndex,
Mesh  mesh 
)
protected

Triggers the on mesh created event.

Parameters
meshIndexMesh index.
meshMesh.

◆ TriggerOnMetadataProcessed()

void TriLib.AssetLoaderBase.TriggerOnMetadataProcessed ( AssimpMetadataType  metadataType,
uint  metadataIndex,
string  metadataKey,
object  metadataValue 
)
protected

Triggers the on metadata processed event.

Parameters
metadataTypeMetadata type.
metadataIndexMetadata index.
metadataKeyMetadata key.
metadataValueMetadata value.

◆ TriggerOnObjectLoaded()

void TriLib.AssetLoaderBase.TriggerOnObjectLoaded ( GameObject  loadedGameObject)
protected

Triggers the on object loaded event.

Parameters
loadedGameObjectCreated UnityEngine.GameObject.

◆ TriggerOnTextureLoaded()

void TriLib.AssetLoaderBase.TriggerOnTextureLoaded ( string  sourcePath,
Material  material,
string  propertyName,
Texture2D  texture 
)
protected

Triggers the on texture loaded event.

Parameters
sourcePathSource path.
materialMaterial.
propertyNameProperty name.
textureTexture.

Member Data Documentation

◆ AnimationData

AnimationData [] TriLib.AssetLoaderBase.AnimationData
protected

Processed TriLib.AnimationData list.

◆ AssimpFilenameMagicString

const string TriLib.AssetLoaderBase.AssimpFilenameMagicString = "$$$___magic___$$$"
protected

Assimp uses this prefix when loading files from memory.

◆ CameraData

CameraData [] TriLib.AssetLoaderBase.CameraData
protected

Processed TriLib.CameraData list.

◆ EmbeddedTextures

Dictionary<string, EmbeddedTextureData> TriLib.AssetLoaderBase.EmbeddedTextures
protected

Loaded EmbeddedTextureData for a given name dictionary.

◆ FilesLoadData

ConcurrentList<FileLoadData> TriLib.AssetLoaderBase.FilesLoadData = new ConcurrentList<FileLoadData>()
static

Stores a FileLoadData reference list for callbacks.

◆ HasBlendShapes

bool TriLib.AssetLoaderBase.HasBlendShapes
protected

Used to temporarily indicate if there are any blend shapes assigned to loaded meshes.

◆ HasBoneInfo

bool TriLib.AssetLoaderBase.HasBoneInfo
protected

Used to temporarily indicate if there are any bones assigned to loaded meshes.

◆ LoadedBoneNames

Dictionary<SkinnedMeshRenderer, IList<string> > TriLib.AssetLoaderBase.LoadedBoneNames
protected

Loaded bone names for a given UnityEngine.SkinnedMeshRenderer dictionary.

◆ LoadedMaterials

Dictionary<string, Material> TriLib.AssetLoaderBase.LoadedMaterials
protected

Loaded UnityEngine.Material for a given name dictionary.

◆ LoadedTextures

Dictionary<string, Texture2D> TriLib.AssetLoaderBase.LoadedTextures
protected

Loaded UnityEngine.Texture2D for a given name dictionary.

◆ MaterialData

MaterialData [] TriLib.AssetLoaderBase.MaterialData
protected

Processed TriLib.MaterialData list.

◆ MeshData

MeshData [] TriLib.AssetLoaderBase.MeshData
protected

Processed TriLib.MeshData list.

◆ MeshDataConnections

Dictionary<string, MeshData> TriLib.AssetLoaderBase.MeshDataConnections
protected

UnityEngine.GameObject and MeshData relationship dictionary used to apply blend-shape animations.

◆ Metadata

AssimpMetadata [] TriLib.AssetLoaderBase.Metadata
protected

Processed TriLib.AssimpMetadata list.

◆ NodeId

uint TriLib.AssetLoaderBase.NodeId
protected

Used to temporarily store nodes id.

◆ NodesPath

Dictionary<string, string> TriLib.AssetLoaderBase.NodesPath
protected

Processed nodes path dictionary.

◆ NotFoundTexture

Texture2D TriLib.AssetLoaderBase.NotFoundTexture
staticprotected

UnityEngine.Texture used to show when no texture is found.

◆ RootNodeData

NodeData TriLib.AssetLoaderBase.RootNodeData
protected

Main scene TriLib.NodeData.

◆ Scene

IntPtr TriLib.AssetLoaderBase.Scene
protected

Pointer to Assimp loaded scene.

◆ StandardBaseAlphaMaterial

Material TriLib.AssetLoaderBase.StandardBaseAlphaMaterial
staticprotected

Base Diffuse Alpha UnityEngine.Material used to load materials.

◆ StandardBaseCutoutMaterial

Material TriLib.AssetLoaderBase.StandardBaseCutoutMaterial
staticprotected

Base Diffuse Cutout UnityEngine.Material used to load materials.

◆ StandardBaseMaterial

Material TriLib.AssetLoaderBase.StandardBaseMaterial
staticprotected

Base Diffuse UnityEngine.Material used to load materials.

◆ StandardSpecularAlphaMaterial

Material TriLib.AssetLoaderBase.StandardSpecularAlphaMaterial
staticprotected

Base Specular Alpha UnityEngine.Material used to load materials.

◆ StandardSpecularCutoutMaterial

Material TriLib.AssetLoaderBase.StandardSpecularCutoutMaterial
staticprotected

Base Specular Cutout UnityEngine.Material used to load materials.

◆ StandardSpecularMaterial

Material TriLib.AssetLoaderBase.StandardSpecularMaterial
staticprotected

Base Specular UnityEngine.Material used to load materials.

Property Documentation

◆ HasOnAnimationClipCreated

bool TriLib.AssetLoaderBase.HasOnAnimationClipCreated
getprotected

Gets a value indicating whether this instance has on animation clip created event.

true if this instance has on animation clip created event; otherwise, false.

◆ HasOnBlendShapeKeyCreated

bool TriLib.AssetLoaderBase.HasOnBlendShapeKeyCreated
getprotected

Gets a value indicating whether this instance has on blend-shape key created event.

true if this instance has on blend-shape loaded event; otherwise, false.

◆ HasOnMaterialCreated

bool TriLib.AssetLoaderBase.HasOnMaterialCreated
getprotected

Gets a value indicating whether this instance has on material created event.

true if this instance has on material created event; otherwise, false.

◆ HasOnMeshCreated

bool TriLib.AssetLoaderBase.HasOnMeshCreated
getprotected

Gets a value indicating whether this instance has on mesh created event.

true if this instance has on mesh created event; otherwise, false.

◆ HasOnMetadataProcessed

bool TriLib.AssetLoaderBase.HasOnMetadataProcessed
getprotected

Gets a value indicating whether this instance has on metadata processed event.

true if this instance has on metadata processed event; otherwise, false.

◆ HasOnObjectLoaded

bool TriLib.AssetLoaderBase.HasOnObjectLoaded
getprotected

Gets a value indicating whether this instance has on object loaded event.

true if this instance has on object loaded event; otherwise, false.

◆ HasOnTextureLoaded

bool TriLib.AssetLoaderBase.HasOnTextureLoaded
getprotected

Gets a value indicating whether this instance has on texture loaded event.

true if this instance has on texture loaded event; otherwise, false.

Event Documentation

◆ EmbeddedTextureLoad

EmbeddedTextureLoadCallback TriLib.AssetLoaderBase.EmbeddedTextureLoad

Use this field to assign the callback that will be triggered when a texture looks up for embedded data.

◆ OnAnimationClipCreated

AnimationClipCreatedHandle TriLib.AssetLoaderBase.OnAnimationClipCreated

Use this field to assign the event that occurs when an animation is created.

◆ OnBlendShapeKeyCreated

BlendShapeKeyCreatedHandle TriLib.AssetLoaderBase.OnBlendShapeKeyCreated

Use this field to assign the event that occurs when a blend-shape key is created.

◆ OnMaterialCreated

MaterialCreatedHandle TriLib.AssetLoaderBase.OnMaterialCreated

Use this field to assign the event that occurs when a material is created.

◆ OnMeshCreated

MeshCreatedHandle TriLib.AssetLoaderBase.OnMeshCreated

Use this field to assign the event that occurs when a mesh is loaded.

◆ OnMetadataProcessed

MetadataProcessedHandle TriLib.AssetLoaderBase.OnMetadataProcessed

Use this field to assign the event that will occurs when each file metadata is processed.

◆ OnObjectLoaded

ObjectLoadedHandle TriLib.AssetLoaderBase.OnObjectLoaded

Use this field to assign the event that occurs when the asset is loaded.

◆ OnTextureLoaded

TextureLoadHandle TriLib.AssetLoaderBase.OnTextureLoaded

Use this field to assign the event that occurs when a texture is loaded.


The documentation for this class was generated from the following file: