docs.unity.cn
    Show / Hide Table of Contents

    Class XRReferenceImageLibraryExtensions

    Extension methods for the XRReferenceImageLibrary.

    Inheritance
    Object
    XRReferenceImageLibraryExtensions
    Namespace: UnityEditor.XR.ARSubsystems
    Syntax
    public static class XRReferenceImageLibraryExtensions : object
    Remarks

    At runtime, XRReferenceImageLibrarys are immutable. These Editor-only extension methods let you build and manipulate image libraries in Editor scripts.

    Methods

    Add(XRReferenceImageLibrary)

    Declaration
    public static void Add(this XRReferenceImageLibrary library)
    Parameters
    Type Name Description
    XRReferenceImageLibrary library

    RemoveAt(XRReferenceImageLibrary, Int32)

    Removes the XRReferenceImage at index.

    Declaration
    public static void RemoveAt(this XRReferenceImageLibrary library, int index)
    Parameters
    Type Name Description
    XRReferenceImageLibrary library

    The XRReferenceImageLibrary being extended.

    Int32 index

    The index in the list of images to remove.

    SetName(XRReferenceImageLibrary, Int32, String)

    Declaration
    public static void SetName(this XRReferenceImageLibrary library, int index, string name)
    Parameters
    Type Name Description
    XRReferenceImageLibrary library
    Int32 index
    String name

    SetSize(XRReferenceImageLibrary, Int32, Vector2)

    Declaration
    public static void SetSize(this XRReferenceImageLibrary library, int index, Vector2 size)
    Parameters
    Type Name Description
    XRReferenceImageLibrary library
    Int32 index
    Vector2 size

    SetSpecifySize(XRReferenceImageLibrary, Int32, Boolean)

    Declaration
    public static void SetSpecifySize(this XRReferenceImageLibrary library, int index, bool specifySize)
    Parameters
    Type Name Description
    XRReferenceImageLibrary library
    Int32 index
    Boolean specifySize

    SetTexture(XRReferenceImageLibrary, Int32, Texture2D, Boolean)

    Set the texture on the reference image.

    Declaration
    public static void SetTexture(this XRReferenceImageLibrary library, int index, Texture2D texture, bool keepTexture)
    Parameters
    Type Name Description
    XRReferenceImageLibrary library

    The XRReferenceImageLibrary being extended.

    Int32 index

    The reference image index to modify.

    Texture2D texture

    The texture to set.

    Boolean keepTexture

    Whether to store a strong reference to the texture. If true, the texture will be available in the Player. Otherwise, XRReferenceImage.texture will be set to null.

    Back to top Copyright © 2022 Unity Technologies
    Generated by DocFX
    on Friday, January 7, 2022
    Terms of use