Class SampleStandaloneLoaderUI
Sample loader UI demonstrating how to provide your own loader selection UI for the loader selection list.
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
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
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
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
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
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 |