Class UIFocus
Provides functionality to determine focus and bounds for UI elements within a composition layer.
Inherited Members
Object.InstantiateAsync<T>(T)
Object.InstantiateAsync<T>(T, Transform)
Object.InstantiateAsync<T>(T, Vector3, Quaternion)
Object.InstantiateAsync<T>(T, Transform, Vector3, Quaternion)
Object.InstantiateAsync<T>(T, InstantiateParameters)
Object.InstantiateAsync<T>(T, Vector3, Quaternion, InstantiateParameters)
Object.Instantiate<T>(T, InstantiateParameters)
Object.Instantiate<T>(T, Vector3, Quaternion, InstantiateParameters)
Object.FindObjectsByType<T>(FindObjectsSortMode)
Object.FindObjectsByType<T>(FindObjectsInactive, FindObjectsSortMode)
Object.FindFirstObjectByType<T>()
Object.FindAnyObjectByType<T>()
Object.FindFirstObjectByType<T>(FindObjectsInactive)
Object.FindAnyObjectByType<T>(FindObjectsInactive)
Namespace: Unity.XR.CompositionLayers.UIInteraction
Assembly: Unity.XR.CompositionLayers.UIInteraction.dll
Syntax
[ExecuteInEditMode]
public class UIFocus : MonoBehaviour
Properties
Canvas
Reference to the Canvas this element is attached to
Declaration
public Canvas Canvas { get; }
Property Value
Type | Description |
---|---|
Canvas |
CompositionLayer
Reference to the parent Composition Layer
Declaration
public CompositionLayer CompositionLayer { get; }
Property Value
Type | Description |
---|---|
CompositionLayer |
MeshCollider
Reference to the MeshCollider of the parent Composition Layer
Declaration
public MeshCollider MeshCollider { get; }
Property Value
Type | Description |
---|---|
MeshCollider |
RectTransform
Reference to this element's RectTransform
Declaration
public RectTransform RectTransform { get; }
Property Value
Type | Description |
---|---|
RectTransform |
Methods
GetBounds()
Determines the bounds of the element based on the type of element it is
Declaration
public Bounds GetBounds()
Returns
Type | Description |
---|---|
Bounds | The bounds of the type |
GetCanvasBounds()
Gets the bounds of the RectTransform in the layer's local space and scales it to the root meshCollider
Declaration
public Bounds GetCanvasBounds()
Returns
Type | Description |
---|---|
Bounds | The bounds of the RectTransform in the layer's local space |