Interface IXRCustomLoaderUI
Custom interface provided by the package if the package uses its own UI in the XR Plug-in Management loader selection window.
Any class that implements this interface must be tagged with the XRCustomLoaderUIAttribute attribute.
Namespace: UnityEditor.XR.Management
Syntax
public interface IXRCustomLoaderUI
Properties
ActiveBuildTargetGroup
Allows XR Plug-in Management to tell the UI which build target group it's being used with.
Declaration
BuildTargetGroup ActiveBuildTargetGroup { get; set; }
Property Value
Type | Description |
---|---|
BuildTargetGroup | Build target that this instance handles. |
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
string[] IncompatibleLoaders { get; }
Property Value
Type | Description |
---|---|
String[] | Array of type names to disable. |
IsLoaderEnabled
Current enabled state of this loader.
Declaration
bool IsLoaderEnabled { get; set; }
Property Value
Type | Description |
---|---|
Boolean | True if the loader has been enabled, false otherwise. |
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
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. |
Methods
OnGUI(Rect)
Call to render the UI for this custom loader.
Declaration
void OnGUI(Rect rect)
Parameters
Type | Name | Description |
---|---|---|
Rect | rect | The rect within which the UI should render into. |
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
void SetRenderedLineHeight(float height)
Parameters
Type | Name | Description |
---|---|---|
Single | height |