docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Method ToXRCpuImageFormat

    ToXRCpuImageFormat(TextureFormat)

    Attempts to convert a UnityEngine.TextureFormat to an XRCpuImage.Format.

    Declaration
    public static XRCpuImage.Format ToXRCpuImageFormat(this TextureFormat @this)
    Parameters
    Type Name Description
    TextureFormat this

    Defines an extension of UnityEngine.TextureFormat.

    Returns
    Type Description
    XRCpuImage.Format

    Returns a XRCpuImage.Format that matches this if possible. Returns Unknown if there is no matching XRCpuImage.Format.

    Remarks

    For some formats, there may be multiple XRCpuImage.Formats that match the format. In this case this method will return a generalized format. For example, UnityEngine.TextureFormat.RFloat will return OneComponent32 instead of DepthFloat32 as it's possible that the single channel is not depth. In these cases, you should also check the image type.

    In This Article
    Back to top Copyright © 2023 Unity Technologies — Terms of use
    Generated by DocFX
    on Friday, September 22, 2023