Class UnityXRDisplay
static container for XRDisplay-related scripting functionality.
Inherited Members
Namespace: UnityEngine.XR.OpenXR.API
Assembly: Unity.XR.OpenXR.dll
Syntax
public static class UnityXRDisplay
Fields
kUnityXRRenderTextureIdDontCare
Unity will allocate the texture if needed. #kUnityXRRenderTextureIdDontCare can be set on UnityXRRenderTextureDesc.nativeColorTexPtr or UnityXRRenderTextureDesc.nativeDepthTexPtr.
Declaration
public const uint kUnityXRRenderTextureIdDontCare = 0
Field Value
Type | Description |
---|---|
uint |
Methods
CreateTexture(UnityXRRenderTextureDesc, out uint)
Create a UnityXRRenderTextureId given a UnityXRRenderTextureDesc.
Declaration
public static extern bool CreateTexture(UnityXRRenderTextureDesc desc, out uint id)
Parameters
Type | Name | Description |
---|---|---|
UnityXRRenderTextureDesc | desc | Descriptor of the texture to be created. |
uint | id | Returned Texture ID representing a unique instance of a texture. |
Returns
Type | Description |
---|---|
bool | true Successfully initialized false Error |
DestroyTexture(uint)
Destroy a texture given a UnityXRRenderTextureId.
Declaration
public static extern bool DestroyTexture(uint textureId)
Parameters
Type | Name | Description |
---|---|---|
uint | textureId | Texture ID represents the instance of a texture to be destroyed. |
Returns
Type | Description |
---|---|
bool | true Successfully destroyed. false Error |