TriLib
Search Results for

    Show / Hide Table of Contents

    Class SimpleTextureMapper

    A custom TextureMapper implementation that uses a user-supplied callback to retrieve texture data. This mapper allows you to control how texture streams are opened, enabling scenarios such as loading from memory or over the network.

    Inheritance
    object
    Object
    ScriptableObject
    TextureMapper
    SimpleTextureMapper
    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.Samples
    Assembly: Assembly-CSharp.dll
    Syntax
    public class SimpleTextureMapper : TextureMapper

    Methods

    Map(TextureLoadingContext)

    Overrides the default texture mapping logic to use the user-supplied callback.

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

    The context containing information about the texture being loaded.

    Overrides
    TextureMapper.Map(TextureLoadingContext)
    Remarks

    TriLib calls this method for each texture that needs to be loaded, allowing you to retrieve texture data from a custom source.

    Setup(Func<ITexture, Stream>)

    Configures the callback used for texture loading.

    Declaration
    public void Setup(Func<ITexture, Stream> streamReceivingCallback)
    Parameters
    Type Name Description
    Func<ITexture, Stream> streamReceivingCallback

    A required callback that returns a Stream containing texture data.

    Exceptions
    Type Condition
    Exception

    Thrown if streamReceivingCallback is null.

    Extension Methods

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