TriLib Exporter
Search Results for

    Show / Hide Table of Contents

    Class TextureExtensions

    Provides extension methods for UnityEngine.Texture objects, enabling format conversion and data reconstruction.

    Inheritance
    object
    TextureExtensions
    Inherited Members
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    object.ToString()
    Namespace: TriLibExporter
    Assembly: Assembly-CSharp.dll
    Syntax
    public static class TextureExtensions

    Methods

    AsRGBA32(Texture)

    Converts a Unity UnityEngine.Texture to a UnityEngine.Texture2D with RGBA32 format.

    Declaration
    public static Texture2D AsRGBA32(this Texture sourceTexture)
    Parameters
    Type Name Description
    Texture sourceTexture

    The source texture to convert.

    Returns
    Type Description
    Texture2D

    A UnityEngine.Texture2D in RGBA32 format.

    Exceptions
    Type Condition
    ArgumentNullException

    Thrown when sourceTexture is null.

    In this article
    Back to top Generated by DocFX