Show / Hide Table of Contents

    Class Interactable

    Inheritance
    System.Object
    UnityEngine.Object
    UnityEngine.Component
    UnityEngine.Behaviour
    UnityEngine.MonoBehaviour
    Interactable
    Inherited Members
    UnityEngine.MonoBehaviour.Invoke(System.String, System.Single)
    UnityEngine.MonoBehaviour.InvokeRepeating(System.String, System.Single, System.Single)
    UnityEngine.MonoBehaviour.CancelInvoke()
    UnityEngine.MonoBehaviour.CancelInvoke(System.String)
    UnityEngine.MonoBehaviour.IsInvoking(System.String)
    UnityEngine.MonoBehaviour.IsInvoking()
    UnityEngine.MonoBehaviour.StartCoroutine(System.Collections.IEnumerator)
    UnityEngine.MonoBehaviour.StartCoroutine_Auto(System.Collections.IEnumerator)
    UnityEngine.MonoBehaviour.StartCoroutine(System.String, System.Object)
    UnityEngine.MonoBehaviour.StartCoroutine(System.String)
    UnityEngine.MonoBehaviour.StopCoroutine(System.String)
    UnityEngine.MonoBehaviour.StopCoroutine(System.Collections.IEnumerator)
    UnityEngine.MonoBehaviour.StopCoroutine(UnityEngine.Coroutine)
    UnityEngine.MonoBehaviour.StopAllCoroutines()
    UnityEngine.MonoBehaviour.print(System.Object)
    UnityEngine.MonoBehaviour.useGUILayout
    UnityEngine.Behaviour.enabled
    UnityEngine.Behaviour.isActiveAndEnabled
    UnityEngine.Component.GetComponent(System.Type)
    UnityEngine.Component.GetComponent<T>()
    UnityEngine.Component.GetComponent(System.String)
    UnityEngine.Component.GetComponentInChildren(System.Type, System.Boolean)
    UnityEngine.Component.GetComponentInChildren(System.Type)
    UnityEngine.Component.GetComponentInChildren<T>()
    UnityEngine.Component.GetComponentInChildren<T>(System.Boolean)
    UnityEngine.Component.GetComponentsInChildren(System.Type)
    UnityEngine.Component.GetComponentsInChildren(System.Type, System.Boolean)
    UnityEngine.Component.GetComponentsInChildren<T>(System.Boolean)
    UnityEngine.Component.GetComponentsInChildren<T>(System.Boolean, System.Collections.Generic.List<T>)
    UnityEngine.Component.GetComponentsInChildren<T>()
    UnityEngine.Component.GetComponentsInChildren<T>(System.Collections.Generic.List<T>)
    UnityEngine.Component.GetComponentInParent(System.Type)
    UnityEngine.Component.GetComponentInParent<T>()
    UnityEngine.Component.GetComponentsInParent(System.Type)
    UnityEngine.Component.GetComponentsInParent(System.Type, System.Boolean)
    UnityEngine.Component.GetComponentsInParent<T>(System.Boolean)
    UnityEngine.Component.GetComponentsInParent<T>(System.Boolean, System.Collections.Generic.List<T>)
    UnityEngine.Component.GetComponentsInParent<T>()
    UnityEngine.Component.GetComponents(System.Type)
    UnityEngine.Component.GetComponents(System.Type, System.Collections.Generic.List<UnityEngine.Component>)
    UnityEngine.Component.GetComponents<T>(System.Collections.Generic.List<T>)
    UnityEngine.Component.GetComponents<T>()
    UnityEngine.Component.CompareTag(System.String)
    UnityEngine.Component.SendMessageUpwards(System.String, System.Object, UnityEngine.SendMessageOptions)
    UnityEngine.Component.SendMessageUpwards(System.String, System.Object)
    UnityEngine.Component.SendMessageUpwards(System.String)
    UnityEngine.Component.SendMessageUpwards(System.String, UnityEngine.SendMessageOptions)
    UnityEngine.Component.SendMessage(System.String, System.Object, UnityEngine.SendMessageOptions)
    UnityEngine.Component.SendMessage(System.String, System.Object)
    UnityEngine.Component.SendMessage(System.String)
    UnityEngine.Component.SendMessage(System.String, UnityEngine.SendMessageOptions)
    UnityEngine.Component.BroadcastMessage(System.String, System.Object, UnityEngine.SendMessageOptions)
    UnityEngine.Component.BroadcastMessage(System.String, System.Object)
    UnityEngine.Component.BroadcastMessage(System.String)
    UnityEngine.Component.BroadcastMessage(System.String, UnityEngine.SendMessageOptions)
    UnityEngine.Component.transform
    UnityEngine.Component.gameObject
    UnityEngine.Component.tag
    UnityEngine.Component.rigidbody
    UnityEngine.Component.rigidbody2D
    UnityEngine.Component.camera
    UnityEngine.Component.light
    UnityEngine.Component.animation
    UnityEngine.Component.constantForce
    UnityEngine.Component.renderer
    UnityEngine.Component.audio
    UnityEngine.Component.guiText
    UnityEngine.Component.networkView
    UnityEngine.Component.guiElement
    UnityEngine.Component.guiTexture
    UnityEngine.Component.collider
    UnityEngine.Component.collider2D
    UnityEngine.Component.hingeJoint
    UnityEngine.Component.particleEmitter
    UnityEngine.Component.particleSystem
    UnityEngine.Object.Destroy(UnityEngine.Object, System.Single)
    UnityEngine.Object.Destroy(UnityEngine.Object)
    UnityEngine.Object.DestroyImmediate(UnityEngine.Object, System.Boolean)
    UnityEngine.Object.DestroyImmediate(UnityEngine.Object)
    UnityEngine.Object.FindObjectsOfType(System.Type)
    UnityEngine.Object.DontDestroyOnLoad(UnityEngine.Object)
    UnityEngine.Object.DestroyObject(UnityEngine.Object, System.Single)
    UnityEngine.Object.DestroyObject(UnityEngine.Object)
    UnityEngine.Object.FindSceneObjectsOfType(System.Type)
    UnityEngine.Object.FindObjectsOfTypeIncludingAssets(System.Type)
    UnityEngine.Object.FindObjectsOfTypeAll(System.Type)
    UnityEngine.Object.ToString()
    UnityEngine.Object.GetInstanceID()
    UnityEngine.Object.GetHashCode()
    UnityEngine.Object.Equals(System.Object)
    UnityEngine.Object.Instantiate(UnityEngine.Object, UnityEngine.Vector3, UnityEngine.Quaternion)
    UnityEngine.Object.Instantiate(UnityEngine.Object, UnityEngine.Vector3, UnityEngine.Quaternion, UnityEngine.Transform)
    UnityEngine.Object.Instantiate(UnityEngine.Object)
    UnityEngine.Object.Instantiate(UnityEngine.Object, UnityEngine.Transform)
    UnityEngine.Object.Instantiate(UnityEngine.Object, UnityEngine.Transform, System.Boolean)
    UnityEngine.Object.Instantiate<T>(T)
    UnityEngine.Object.FindObjectsOfType<T>()
    UnityEngine.Object.FindObjectOfType(System.Type)
    UnityEngine.Object.FindObjectOfType<T>()
    UnityEngine.Object.name
    UnityEngine.Object.hideFlags
    System.Object.Equals(System.Object, System.Object)
    System.Object.GetType()
    System.Object.MemberwiseClone()
    System.Object.ReferenceEquals(System.Object, System.Object)
    Namespace: Valve.VR.InteractionSystem
    Assembly: Assembly-CSharp.dll
    Syntax
    public class Interactable : MonoBehaviour

    Fields

    activateActionSetOnAttach

    Declaration
    [Tooltip("Activates an action set on attach and deactivates on detach")]
    public SteamVR_ActionSet activateActionSetOnAttach
    Field Value
    Type Description
    SteamVR_ActionSet

    attachEaseIn

    Declaration
    public bool attachEaseIn
    Field Value
    Type Description
    System.Boolean

    attachedToHand

    Declaration
    [NonSerialized]
    public Hand attachedToHand
    Field Value
    Type Description
    Hand

    blendToPoseTime

    Declaration
    protected float blendToPoseTime
    Field Value
    Type Description
    System.Single

    existingRenderers

    Declaration
    protected MeshRenderer[] existingRenderers
    Field Value
    Type Description
    UnityEngine.MeshRenderer[]

    existingSkinnedRenderers

    Declaration
    protected SkinnedMeshRenderer[] existingSkinnedRenderers
    Field Value
    Type Description
    UnityEngine.SkinnedMeshRenderer[]

    handAnimationOnPickup

    Declaration
    [Tooltip("The integer in the animator to trigger on pickup. 0 for none")]
    public int handAnimationOnPickup
    Field Value
    Type Description
    System.Int32

    handFollowTransform

    Declaration
    [Tooltip("Should the rendered hand lock on to and follow the object")]
    public bool handFollowTransform
    Field Value
    Type Description
    System.Boolean

    hideControllerOnAttach

    Declaration
    [Tooltip("Hide the controller part of the hand on attachment and show on detach")]
    public bool hideControllerOnAttach
    Field Value
    Type Description
    System.Boolean

    hideHandOnAttach

    Declaration
    [Tooltip("Hide the whole hand on attachment and show on detach")]
    public bool hideHandOnAttach
    Field Value
    Type Description
    System.Boolean

    hideHighlight

    Declaration
    [Tooltip("An array of child gameObjects to not render a highlight for. Things like transparent parts, vfx, etc.")]
    public GameObject[] hideHighlight
    Field Value
    Type Description
    UnityEngine.GameObject[]

    hideSkeletonOnAttach

    Declaration
    [Tooltip("Hide the skeleton part of the hand on attachment and show on detach")]
    public bool hideSkeletonOnAttach
    Field Value
    Type Description
    System.Boolean

    highlightHolder

    Declaration
    protected GameObject highlightHolder
    Field Value
    Type Description
    UnityEngine.GameObject

    highlightMat

    Declaration
    protected static Material highlightMat
    Field Value
    Type Description
    UnityEngine.Material

    highlightOnHover

    Declaration
    [Tooltip("Set whether or not you want this interactible to highlight when hovering over it")]
    public bool highlightOnHover
    Field Value
    Type Description
    System.Boolean

    highlightRenderers

    Declaration
    protected MeshRenderer[] highlightRenderers
    Field Value
    Type Description
    UnityEngine.MeshRenderer[]

    highlightSkinnedRenderers

    Declaration
    protected SkinnedMeshRenderer[] highlightSkinnedRenderers
    Field Value
    Type Description
    UnityEngine.SkinnedMeshRenderer[]

    hoveringHand

    Declaration
    [NonSerialized]
    public Hand hoveringHand
    Field Value
    Type Description
    Hand

    releasePoseBlendTime

    Declaration
    protected float releasePoseBlendTime
    Field Value
    Type Description
    System.Single

    setRangeOfMotionOnPickup

    Declaration
    [Tooltip("The range of motion to set on the skeleton. None for no change.")]
    public SkeletalMotionRangeChange setRangeOfMotionOnPickup
    Field Value
    Type Description
    SkeletalMotionRangeChange

    skeletonPoser

    Declaration
    [HideInInspector]
    public SteamVR_Skeleton_Poser skeletonPoser
    Field Value
    Type Description
    SteamVR_Skeleton_Poser

    snapAttachEaseInCompleted

    Declaration
    public bool snapAttachEaseInCompleted
    Field Value
    Type Description
    System.Boolean

    snapAttachEaseInCurve

    Declaration
    [HideInInspector]
    public AnimationCurve snapAttachEaseInCurve
    Field Value
    Type Description
    UnityEngine.AnimationCurve

    snapAttachEaseInTime

    Declaration
    public float snapAttachEaseInTime
    Field Value
    Type Description
    System.Single

    useHandObjectAttachmentPoint

    Declaration
    [Tooltip("Specify whether you want to snap to the hand's object attachment point, or just the raw hand")]
    public bool useHandObjectAttachmentPoint
    Field Value
    Type Description
    System.Boolean

    Properties

    isDestroying

    Declaration
    public bool isDestroying { get; protected set; }
    Property Value
    Type Description
    System.Boolean

    isHovering

    Declaration
    public bool isHovering { get; protected set; }
    Property Value
    Type Description
    System.Boolean

    wasHovering

    Declaration
    public bool wasHovering { get; protected set; }
    Property Value
    Type Description
    System.Boolean

    Methods

    CreateHighlightRenderers()

    Declaration
    protected virtual void CreateHighlightRenderers()

    OnAttachedToHand(Hand)

    Declaration
    protected virtual void OnAttachedToHand(Hand hand)
    Parameters
    Type Name Description
    Hand hand

    OnDestroy()

    Declaration
    protected virtual void OnDestroy()

    OnDetachedFromHand(Hand)

    Declaration
    protected virtual void OnDetachedFromHand(Hand hand)
    Parameters
    Type Name Description
    Hand hand

    OnDisable()

    Declaration
    protected virtual void OnDisable()

    OnHandHoverBegin(Hand)

    Called when a Hand starts hovering over this object

    Declaration
    protected virtual void OnHandHoverBegin(Hand hand)
    Parameters
    Type Name Description
    Hand hand

    ShouldIgnore(GameObject)

    Declaration
    protected virtual bool ShouldIgnore(GameObject check)
    Parameters
    Type Name Description
    UnityEngine.GameObject check
    Returns
    Type Description
    System.Boolean

    ShouldIgnoreHighlight(Component)

    Declaration
    protected virtual bool ShouldIgnoreHighlight(Component component)
    Parameters
    Type Name Description
    UnityEngine.Component component
    Returns
    Type Description
    System.Boolean

    Start()

    Declaration
    protected virtual void Start()

    Update()

    Declaration
    protected virtual void Update()

    UpdateHighlightRenderers()

    Declaration
    protected virtual void UpdateHighlightRenderers()

    Events

    onAttachedToHand

    Declaration
    public event Interactable.OnAttachedToHandDelegate onAttachedToHand
    Event Type
    Type Description
    Interactable.OnAttachedToHandDelegate

    onDetachedFromHand

    Declaration
    public event Interactable.OnDetachedFromHandDelegate onDetachedFromHand
    Event Type
    Type Description
    Interactable.OnDetachedFromHandDelegate
    In This Article
    • Fields
      • activateActionSetOnAttach
      • attachEaseIn
      • attachedToHand
      • blendToPoseTime
      • existingRenderers
      • existingSkinnedRenderers
      • handAnimationOnPickup
      • handFollowTransform
      • hideControllerOnAttach
      • hideHandOnAttach
      • hideHighlight
      • hideSkeletonOnAttach
      • highlightHolder
      • highlightMat
      • highlightOnHover
      • highlightRenderers
      • highlightSkinnedRenderers
      • hoveringHand
      • releasePoseBlendTime
      • setRangeOfMotionOnPickup
      • skeletonPoser
      • snapAttachEaseInCompleted
      • snapAttachEaseInCurve
      • snapAttachEaseInTime
      • useHandObjectAttachmentPoint
    • Properties
      • isDestroying
      • isHovering
      • wasHovering
    • Methods
      • CreateHighlightRenderers()
      • OnAttachedToHand(Hand)
      • OnDestroy()
      • OnDetachedFromHand(Hand)
      • OnDisable()
      • OnHandHoverBegin(Hand)
      • ShouldIgnore(GameObject)
      • ShouldIgnoreHighlight(Component)
      • Start()
      • Update()
      • UpdateHighlightRenderers()
    • Events
      • onAttachedToHand
      • onDetachedFromHand
    Back to top Copyright (c) Valve Corporation, All rights reserved.