docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Class XRTextureTypeExtensions

    Extension methods for XRTextureType.

    Inheritance
    object
    XRTextureTypeExtensions
    Inherited Members
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    object.ToString()
    Namespace: UnityEngine.XR.ARSubsystems
    Assembly: Unity.XR.ARSubsystems.dll
    Syntax
    public static class XRTextureTypeExtensions

    Methods

    IsRenderTexture(XRTextureType)

    Indicates whether the texture type is represented in Unity as a RenderTexture.

    Declaration
    public static bool IsRenderTexture(this XRTextureType textureType)
    Parameters
    Type Name Description
    XRTextureType textureType

    The texture type.

    Returns
    Type Description
    bool

    true> if the texture type is represented in Unity as a render texture. Otherwise, false.

    ToTextureDimension(XRTextureType)

    Converts a given XRTextureType to a TextureDimension.

    Declaration
    public static TextureDimension ToTextureDimension(this XRTextureType textureType)
    Parameters
    Type Name Description
    XRTextureType textureType

    A texture type to be converted.

    Returns
    Type Description
    TextureDimension

    An equivalent TextureDimension.

    ToXRTextureType(TextureDimension)

    Converts a given TextureDimension to an XRTextureType.

    Declaration
    public static XRTextureType ToXRTextureType(this TextureDimension dimension)
    Parameters
    Type Name Description
    TextureDimension dimension

    A texture dimension to be converted.

    Returns
    Type Description
    XRTextureType

    An equivalent XRTextureType.

    Remarks

    AR Foundation supports the following texture dimensions:

    • Tex2D
    • Tex3D
    • Cube.
    In This Article
    Back to top
    Copyright © 2025 Unity Technologies — Trademarks and terms of use
    • Legal
    • Privacy Policy
    • Cookie Policy
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)