docs.unity3d.com
    Show / Hide Table of Contents

    Class SampleStandaloneLoaderUI

    Sample loader UI demonstrating how to provide your own loader selection UI for the loader selection list.

    Inheritance
    Object
    SampleStandaloneLoaderUI
    Namespace: Samples
    Syntax
    public class SampleStandaloneLoaderUI : object, IXRCustomLoaderUI

    Properties

    ActiveBuildTargetGroup

    Allows XR Plug-in Management to tell the UI which build target group it's being used with.

    Declaration
    public BuildTargetGroup ActiveBuildTargetGroup { get; set; }
    Property Value
    Type Description
    BuildTargetGroup

    Build target that this instance handles.

    Implements
    IXRCustomLoaderUI.ActiveBuildTargetGroup

    IncompatibleLoaders

    Array of type names that are incompatible with the loader when it's enabled. Non-compatible loaders will be grayed out in the UI.

    Declaration
    public string[] IncompatibleLoaders { get; }
    Property Value
    Type Description
    String[]

    Array of type names to disable.

    Implements
    IXRCustomLoaderUI.IncompatibleLoaders

    IsLoaderEnabled

    Current enabled state of this loader.

    Declaration
    public bool IsLoaderEnabled { get; set; }
    Property Value
    Type Description
    Boolean

    True if the loader has been enabled, false otherwise.

    Implements
    IXRCustomLoaderUI.IsLoaderEnabled

    RequiredRenderHeight

    The height of the area within the UI that this renderer will need to render its UI. This height will be the height of the rect passed into the OnGUI(Rect) call. This should return a a non-zero value that's a multiple of the line height set in SetRenderedLineHeight(Single).

    Declaration
    public float RequiredRenderHeight { get; }
    Property Value
    Type Description
    Single

    Non-zero multiple of the line height set in SetRenderedLineHeight(Single). If this is 0, the rect passed to OnGUI(Rect) will be the default line height.

    Implements
    IXRCustomLoaderUI.RequiredRenderHeight

    Methods

    OnGUI(Rect)

    Call to render the UI for this custom loader.

    Declaration
    public void OnGUI(Rect rect)
    Parameters
    Type Name Description
    Rect rect

    The rect within which the UI should render into.

    Implements
    IXRCustomLoaderUI.OnGUI(Rect)

    SetRenderedLineHeight(Single)

    The Rendering component passes the expected line height to the custom renderer. This allows the component to calculate the necessary area height required to render the custom UI into the component space. The calculated value should be returned from the RequiredRenderHeight.

    Declaration
    public void SetRenderedLineHeight(float height)
    Parameters
    Type Name Description
    Single height
    Implements
    IXRCustomLoaderUI.SetRenderedLineHeight(Single)
    Back to top
    Copyright © 2023 Unity Technologies — Terms of use
    • Legal
    • Privacy Policy
    • Cookies
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)
    "Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
    Generated by DocFX on 18 October 2023