Class XRTintInteractableVisual
Simple Interactable Visual component that demonstrates hover or selection state with emissive tinting. Note: requires use of a shader that supports emission (such as Standard shader) with the variant included in the game build.
Inherited Members
Object.FindObjectsByType<T>(FindObjectsSortMode)
Object.FindObjectsByType<T>(FindObjectsInactive, FindObjectsSortMode)
Object.FindFirstObjectByType<T>()
Object.FindAnyObjectByType<T>()
Object.FindFirstObjectByType<T>(FindObjectsInactive)
Object.FindAnyObjectByType<T>(FindObjectsInactive)
Namespace: UnityEngine.XR.Interaction.Toolkit
Assembly: solution.dll
Syntax
[AddComponentMenu("XR/Visual/XR Tint Interactable Visual", 11)]
[DisallowMultipleComponent]
[HelpURL("https://docs.unity.cn/Packages/com.unity.xr.interaction.toolkit@3.0/api/UnityEngine.XR.Interaction.Toolkit.XRTintInteractableVisual.html")]
public class XRTintInteractableVisual : MonoBehaviour
Properties
| Name | Description |
|---|---|
| tintColor | The tint color for interactable. |
| tintOnHover | Whether this should tint on hover. |
| tintOnSelection | Whether this should tint on selection. |
| tintRenderers | The Renderer(s) to use for tinting (will default to any Renderer on the GameObject if not specified). |
Methods
| Name | Description |
|---|---|
| Awake() | See MonoBehaviour. |
| GetEmissionEnabled() | Gets whether all shared materials on the Renderers used for tinting have emission enabled. |
| OnDestroy() | See MonoBehaviour. |
| SetTint(bool) | Apply or remove a tint to all Renderers used for tinting. |