TriLib
Search Results for

    Show / Hide Table of Contents

    Class 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.

    Inheritance
    object
    Object
    ScriptableObject
    TextureMapper
    PerFilenameTextureMapper
    Inherited Members
    TextureMapper.CheckingOrder
    TextureMapper.Map(AssetLoaderContext, ITexture)
    ScriptableObject.SetDirty()
    ScriptableObject.CreateInstance(string)
    ScriptableObject.CreateInstance(Type)
    ScriptableObject.CreateInstance<T>()
    Object.GetInstanceID()
    Object.GetHashCode()
    Object.Equals(object)
    Object.Instantiate(Object, Vector3, Quaternion)
    Object.Instantiate(Object, Vector3, Quaternion, Transform)
    Object.Instantiate(Object)
    Object.Instantiate(Object, Transform)
    Object.Instantiate(Object, Transform, bool)
    Object.Instantiate<T>(T)
    Object.Instantiate<T>(T, Vector3, Quaternion)
    Object.Instantiate<T>(T, Vector3, Quaternion, Transform)
    Object.Instantiate<T>(T, Transform)
    Object.Instantiate<T>(T, Transform, bool)
    Object.Destroy(Object, float)
    Object.Destroy(Object)
    Object.DestroyImmediate(Object, bool)
    Object.DestroyImmediate(Object)
    Object.FindObjectsOfType(Type)
    Object.FindObjectsOfType(Type, bool)
    Object.DontDestroyOnLoad(Object)
    Object.DestroyObject(Object, float)
    Object.DestroyObject(Object)
    Object.FindSceneObjectsOfType(Type)
    Object.FindObjectsOfTypeIncludingAssets(Type)
    Object.FindObjectsOfType<T>()
    Object.FindObjectsOfType<T>(bool)
    Object.FindObjectOfType<T>()
    Object.FindObjectOfType<T>(bool)
    Object.FindObjectsOfTypeAll(Type)
    Object.FindObjectOfType(Type)
    Object.FindObjectOfType(Type, bool)
    Object.ToString()
    Object.name
    Object.hideFlags
    object.Equals(object, object)
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    Namespace: TriLibCore.Mappers
    Assembly: Assembly-CSharp.dll
    Syntax
    public class PerFilenameTextureMapper : TextureMapper

    Methods

    Map(TextureLoadingContext)

    Attempts to locate and open a data stream for a texture by matching the model file's short filename with the short filenames of files found in the same directory.

    Declaration
    public override void Map(TextureLoadingContext textureLoadingContext)
    Parameters
    Type Name Description
    TextureLoadingContext textureLoadingContext

    The TextureLoadingContext containing the TriLib texture information, including the model filename (via Filename) and the output stream.

    Overrides
    TextureMapper.Map(TextureLoadingContext)
    Remarks

    If the model filename is null or the directory does not exist, the method exits immediately. Otherwise, it retrieves all files in the directory and uses IsValidTextureFileType(string) to filter for valid texture file types. For each valid file, the mapper compares its short filename (converted to lower-case) with the model file's short filename (also in lower-case). When a match is found, it opens the file stream and assigns it to the texture loading context.

    Extension Methods

    IObjectExtensions.TryToDispose<T>(object)
    In this article
    Back to top Generated by DocFX