Class HVRSocket
Inheritance
System.Object
UnityEngine.Object
UnityEngine.Component
UnityEngine.Behaviour
UnityEngine.MonoBehaviour
HVRSocket
Inherited Members
UnityEngine.MonoBehaviour.IsInvoking()
UnityEngine.MonoBehaviour.CancelInvoke()
UnityEngine.MonoBehaviour.Invoke(System.String, System.Single)
UnityEngine.MonoBehaviour.InvokeRepeating(System.String, System.Single, System.Single)
UnityEngine.MonoBehaviour.CancelInvoke(System.String)
UnityEngine.MonoBehaviour.IsInvoking(System.String)
UnityEngine.MonoBehaviour.StartCoroutine(System.String)
UnityEngine.MonoBehaviour.StartCoroutine(System.String, System.Object)
UnityEngine.MonoBehaviour.StartCoroutine(System.Collections.IEnumerator)
UnityEngine.MonoBehaviour.StartCoroutine_Auto(System.Collections.IEnumerator)
UnityEngine.MonoBehaviour.StopCoroutine(System.Collections.IEnumerator)
UnityEngine.MonoBehaviour.StopCoroutine(UnityEngine.Coroutine)
UnityEngine.MonoBehaviour.StopCoroutine(System.String)
UnityEngine.MonoBehaviour.StopAllCoroutines()
UnityEngine.MonoBehaviour.print(System.Object)
UnityEngine.MonoBehaviour.useGUILayout
UnityEngine.MonoBehaviour.runInEditMode
UnityEngine.Behaviour.enabled
UnityEngine.Behaviour.isActiveAndEnabled
UnityEngine.Component.GetComponent(System.Type)
UnityEngine.Component.GetComponent<T>()
UnityEngine.Component.TryGetComponent(System.Type, UnityEngine.Component)
UnityEngine.Component.TryGetComponent<T>(T)
UnityEngine.Component.GetComponent(System.String)
UnityEngine.Component.GetComponentInChildren(System.Type, System.Boolean)
UnityEngine.Component.GetComponentInChildren(System.Type)
UnityEngine.Component.GetComponentInChildren<T>(System.Boolean)
UnityEngine.Component.GetComponentInChildren<T>()
UnityEngine.Component.GetComponentsInChildren(System.Type, System.Boolean)
UnityEngine.Component.GetComponentsInChildren(System.Type)
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, System.Boolean)
UnityEngine.Component.GetComponentsInParent(System.Type)
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.Component.SendMessage(System.String)
UnityEngine.Component.SendMessage(System.String, System.Object, UnityEngine.SendMessageOptions)
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.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.Instantiate<T>(T, UnityEngine.Vector3, UnityEngine.Quaternion)
UnityEngine.Object.Instantiate<T>(T, UnityEngine.Vector3, UnityEngine.Quaternion, UnityEngine.Transform)
UnityEngine.Object.Instantiate<T>(T, UnityEngine.Transform)
UnityEngine.Object.Instantiate<T>(T, UnityEngine.Transform, System.Boolean)
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.FindObjectsOfType<T>()
UnityEngine.Object.FindObjectOfType<T>()
UnityEngine.Object.FindObjectsOfTypeAll(System.Type)
UnityEngine.Object.FindObjectOfType(System.Type)
UnityEngine.Object.ToString()
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: HurricaneVR.Framework.Core.Grabbers
Assembly: HurricaneVR.Framework.dll
Syntax
public class HVRSocket : HVRGrabberBase
Fields
| Improve this Doc View Source_appQuitting
Declaration
protected bool _appQuitting
Field Value
Type | Description |
---|---|
System.Boolean |
_fixPositionRoutine
Declaration
protected Coroutine _fixPositionRoutine
Field Value
Type | Description |
---|---|
UnityEngine.Coroutine |
_hadRigidBody
Declaration
protected bool _hadRigidBody
Field Value
Type | Description |
---|---|
System.Boolean |
_ignoreGrabSFX
Declaration
protected bool _ignoreGrabSFX
Field Value
Type | Description |
---|---|
System.Boolean |
_mass
Declaration
protected float _mass
Field Value
Type | Description |
---|---|
System.Single |
_modelBounds
Declaration
protected Bounds _modelBounds
Field Value
Type | Description |
---|---|
UnityEngine.Bounds |
_previousParent
Declaration
protected Transform _previousParent
Field Value
Type | Description |
---|---|
UnityEngine.Transform |
_previousScale
Declaration
protected Vector3 _previousScale
Field Value
Type | Description |
---|---|
UnityEngine.Vector3 |
_timeoutGrabbable
Declaration
protected HVRGrabbable _timeoutGrabbable
Field Value
Type | Description |
---|---|
HVRGrabbable |
AudioGrabbedFallback
Declaration
[Tooltip("Fallback grabbed sfx to play if the socketable doesn't have one.")]
public AudioClip AudioGrabbedFallback
Field Value
Type | Description |
---|---|
UnityEngine.AudioClip |
AudioGrabbedOverride
Declaration
[Header("SFX")]
[Tooltip("Prioritized SFX to play for anything socketed")]
public AudioClip AudioGrabbedOverride
Field Value
Type | Description |
---|---|
UnityEngine.AudioClip |
AudioReleasedFallback
Declaration
[Tooltip("Fallback released sfx to play if the socketable doesn't have one.")]
public AudioClip AudioReleasedFallback
Field Value
Type | Description |
---|---|
UnityEngine.AudioClip |
AudioReleasedOverride
Declaration
[Tooltip("Prioritized SFX to play for anything released")]
public AudioClip AudioReleasedOverride
Field Value
Type | Description |
---|---|
UnityEngine.AudioClip |
AutoSpawnPrefab
Declaration
[Tooltip("If supplied, this object will be cloned when one is removed.")]
public GameObject AutoSpawnPrefab
Field Value
Type | Description |
---|---|
UnityEngine.GameObject |
CanGrabStabbingGrabbable
Declaration
[Tooltip("If the grabbable stabber is stabbing something, can this socket grab it ?")]
public bool CanGrabStabbingGrabbable
Field Value
Type | Description |
---|---|
System.Boolean |
CanRemoveGrabbable
Declaration
[Tooltip("If false then you can't remove the grabbable via hand grab.")]
public bool CanRemoveGrabbable
Field Value
Type | Description |
---|---|
System.Boolean |
CheckHandOverlap
Declaration
[Tooltip("If true the hand socket detector must have detected this socket to be placed as well.")]
public bool CheckHandOverlap
Field Value
Type | Description |
---|---|
System.Boolean |
DebugScale
Declaration
[Header("Debugging")]
public bool DebugScale
Field Value
Type | Description |
---|---|
System.Boolean |
DisableCollision
Declaration
[Tooltip("If false, the socketed object colliders remain active, only works for static or kinematic rb sockets.")]
public bool DisableCollision
Field Value
Type | Description |
---|---|
System.Boolean |
DistanceSource
Declaration
[Header("Misc")]
[Tooltip("If supplied the hand will use this point when sorting distance to the closest socket instead of the socket position")]
public Transform DistanceSource
Field Value
Type | Description |
---|---|
UnityEngine.Transform |
FilterCondition
Declaration
[Tooltip("If multiple filters are in use, must all be valid or just one?")]
public SocketCondition FilterCondition
Field Value
Type | Description |
---|---|
SocketCondition |
GrabbableMustBeHeld
Declaration
[Tooltip("If true item's must be placed with a hand grabber.")]
public bool GrabbableMustBeHeld
Field Value
Type | Description |
---|---|
System.Boolean |
GrabControl
Declaration
[Header("Grab Settings")]
public HVRGrabControls GrabControl
Field Value
Type | Description |
---|---|
HVRGrabControls |
GrabDetectionType
Declaration
public HVRGrabDetection GrabDetectionType
Field Value
Type | Description |
---|---|
HVRGrabDetection |
GrabsFromHand
Declaration
[Tooltip("If true will snatch from a hand on hover.")]
public bool GrabsFromHand
Field Value
Type | Description |
---|---|
System.Boolean |
GrabTimeout
Declaration
[Tooltip("If > 0 the last object released cannot be grabbed again until the timeout is reached")]
public float GrabTimeout
Field Value
Type | Description |
---|---|
System.Single |
HandGrabActions
Declaration
[Tooltip("Actions to apply when the socket is being hovered by a hand.")]
public HVRSocketHoverAction[] HandGrabActions
Field Value
Type | Description |
---|---|
HVRSocketHoverAction[] |
HoldType
Declaration
public SocketHoldType HoldType
Field Value
Type | Description |
---|---|
SocketHoldType |
HoverActions
Declaration
[Tooltip("Actions to apply when the socket is being hovered by a grabbable. Auto populates if empty")]
public HVRSocketHoverAction[] HoverActions
Field Value
Type | Description |
---|---|
HVRSocketHoverAction[] |
InstantHandPose
Declaration
[Tooltip("If true, the hand grabbing an object out of this will instantly bring the object to pose orientation.")]
public bool InstantHandPose
Field Value
Type | Description |
---|---|
System.Boolean |
ParentDisablesGrab
Declaration
[Tooltip("If parent grabbable is socketed, disable grabbing.")]
public bool ParentDisablesGrab
Field Value
Type | Description |
---|---|
System.Boolean |
ParentGrabbable
Declaration
[Tooltip("Parent grabbable used with ParentDisablesGrab.")]
public HVRGrabbable ParentGrabbable
Field Value
Type | Description |
---|---|
HVRGrabbable |
ReleasesOnHover
Declaration
[Tooltip("Releases the current grabbable if another valid one is in range")]
public bool ReleasesOnHover
Field Value
Type | Description |
---|---|
System.Boolean |
ScaleGrabbable
Declaration
[Tooltip("Scales the grabbable down to fit based on Size and the model bounds.")]
public bool ScaleGrabbable
Field Value
Type | Description |
---|---|
System.Boolean |
Size
Declaration
[Tooltip("Grabbable scales down to this size along its longest extent.")]
public float Size
Field Value
Type | Description |
---|---|
System.Single |
SocketFilters
Declaration
[Header("Socketable Filtering")]
[Tooltip("Filters to filter out socketables.")]
public HVRSocketFilter[] SocketFilters
Field Value
Type | Description |
---|---|
HVRSocketFilter[] |
SpawnedPrefab
Declaration
[Tooltip("Fires when an AutoSpawnedPrefab is instantiated.")]
public SocketSpawnEvent SpawnedPrefab
Field Value
Type | Description |
---|---|
SocketSpawnEvent |
Properties
| Improve this Doc View SourceAllowSwap
Declaration
public override bool AllowSwap { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
Overrides
| Improve this Doc View SourceCanAddGrabbable
Declaration
public bool CanAddGrabbable { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
CanInteract
Declaration
public virtual bool CanInteract { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
IsGrabActivated
Declaration
public override bool IsGrabActivated { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
Overrides
| Improve this Doc View SourceIsHoldActive
Declaration
public override bool IsHoldActive { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
Overrides
| Improve this Doc View SourceIsSocket
Declaration
public override bool IsSocket { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
Overrides
| Improve this Doc View SourceLinkedGrabbable
Declaration
public HVRGrabbable LinkedGrabbable { get; }
Property Value
Type | Description |
---|---|
HVRGrabbable |
Methods
| Improve this Doc View SourceCanGrab(HVRGrabbable)
Declaration
public override bool CanGrab(HVRGrabbable grabbable)
Parameters
Type | Name | Description |
---|---|---|
HVRGrabbable | grabbable |
Returns
Type | Description |
---|---|
System.Boolean |
Overrides
| Improve this Doc View SourceCanGrabbableBeRemoved(HVRHandGrabber)
Declaration
public virtual bool CanGrabbableBeRemoved(HVRHandGrabber hand)
Parameters
Type | Name | Description |
---|---|---|
HVRHandGrabber | hand |
Returns
Type | Description |
---|---|
System.Boolean |
CanGrabEx(HVRGrabbable)
Bypass the held check for GrabsFromHand
Declaration
protected virtual bool CanGrabEx(HVRGrabbable grabbable)
Parameters
Type | Name | Description |
---|---|---|
HVRGrabbable | grabbable |
Returns
Type | Description |
---|---|
System.Boolean |
CanHover(HVRGrabbable)
Declaration
public override bool CanHover(HVRGrabbable grabbable)
Parameters
Type | Name | Description |
---|---|---|
HVRGrabbable | grabbable |
Returns
Type | Description |
---|---|
System.Boolean |
Overrides
| Improve this Doc View SourceCheckAutoSpawn()
Declaration
protected virtual void CheckAutoSpawn()
CheckGrab()
Declaration
protected override void CheckGrab()
Overrides
| Improve this Doc View SourceCheckHover()
Declaration
protected override bool CheckHover()
Returns
Type | Description |
---|---|
System.Boolean |
Overrides
| Improve this Doc View SourceCleanupRigidBody(HVRGrabbable)
Declaration
protected virtual void CleanupRigidBody(HVRGrabbable grabbable)
Parameters
Type | Name | Description |
---|---|---|
HVRGrabbable | grabbable |
GetDistanceToGrabber(Vector3)
Gets the distance between this grabbable and the provided grabber
Declaration
public virtual float GetDistanceToGrabber(Vector3 point)
Parameters
Type | Name | Description |
---|---|---|
UnityEngine.Vector3 | point |
Returns
Type | Description |
---|---|
System.Single |
GetPositionOffset(HVRGrabbable)
Declaration
protected virtual Vector3 GetPositionOffset(HVRGrabbable grabbable)
Parameters
Type | Name | Description |
---|---|---|
HVRGrabbable | grabbable |
Returns
Type | Description |
---|---|
UnityEngine.Vector3 |
GetRotationOffset(HVRGrabbable)
Declaration
protected virtual Quaternion GetRotationOffset(HVRGrabbable grabbable)
Parameters
Type | Name | Description |
---|---|---|
HVRGrabbable | grabbable |
Returns
Type | Description |
---|---|
UnityEngine.Quaternion |
GetSquareDistanceToGrabber(Vector3)
Gets the Squared Distance between this grabbable and the provided grabber
Declaration
public virtual float GetSquareDistanceToGrabber(Vector3 point)
Parameters
Type | Name | Description |
---|---|---|
UnityEngine.Vector3 | point |
Returns
Type | Description |
---|---|
System.Single |
GetTargetPosition(HVRGrabbable)
Declaration
protected virtual Vector3 GetTargetPosition(HVRGrabbable grabbable)
Parameters
Type | Name | Description |
---|---|---|
HVRGrabbable | grabbable |
Returns
Type | Description |
---|---|
UnityEngine.Vector3 |
GetTargetRotation(HVRGrabbable)
Declaration
protected virtual Quaternion GetTargetRotation(HVRGrabbable grabbable)
Parameters
Type | Name | Description |
---|---|---|
HVRGrabbable | grabbable |
Returns
Type | Description |
---|---|
UnityEngine.Quaternion |
GrabTimeoutRoutine(HVRGrabbable)
Declaration
protected virtual IEnumerator GrabTimeoutRoutine(HVRGrabbable grabbable)
Parameters
Type | Name | Description |
---|---|---|
HVRGrabbable | grabbable |
Returns
Type | Description |
---|---|
System.Collections.IEnumerator |
HandleRigidBodyGrab(HVRGrabbable)
Declaration
protected virtual void HandleRigidBodyGrab(HVRGrabbable grabbable)
Parameters
Type | Name | Description |
---|---|---|
HVRGrabbable | grabbable |
IsValid(HVRGrabbable)
Declaration
public virtual bool IsValid(HVRGrabbable grabbable)
Parameters
Type | Name | Description |
---|---|---|
HVRGrabbable | grabbable |
Returns
Type | Description |
---|---|
System.Boolean |
OnAfterHover(HVRGrabbable)
Declaration
protected override void OnAfterHover(HVRGrabbable grabbable)
Parameters
Type | Name | Description |
---|---|---|
HVRGrabbable | grabbable |
Overrides
| Improve this Doc View SourceOnBeforeHover(HVRGrabbable)
Declaration
protected override void OnBeforeHover(HVRGrabbable grabbable)
Parameters
Type | Name | Description |
---|---|---|
HVRGrabbable | grabbable |
Overrides
| Improve this Doc View SourceOnGrabbableParented(HVRGrabbable)
Declaration
protected virtual void OnGrabbableParented(HVRGrabbable grabbable)
Parameters
Type | Name | Description |
---|---|---|
HVRGrabbable | grabbable |
OnGrabbed(HVRGrabArgs)
Declaration
protected override void OnGrabbed(HVRGrabArgs args)
Parameters
Type | Name | Description |
---|---|---|
HVRGrabArgs | args |
Overrides
| Improve this Doc View SourceOnHandGrabberEntered()
Declaration
public void OnHandGrabberEntered()
OnHandGrabberExited()
Declaration
public void OnHandGrabberExited()
OnHoverEnter(HVRGrabbable)
Declaration
protected override void OnHoverEnter(HVRGrabbable grabbable)
Parameters
Type | Name | Description |
---|---|---|
HVRGrabbable | grabbable |
Overrides
| Improve this Doc View SourceOnHoverExit(HVRGrabbable)
Declaration
protected override void OnHoverExit(HVRGrabbable grabbable)
Parameters
Type | Name | Description |
---|---|---|
HVRGrabbable | grabbable |
Overrides
| Improve this Doc View SourceOnHoverGrabbableReleased(HVRGrabberBase, HVRGrabbable)
Declaration
protected virtual void OnHoverGrabbableReleased(HVRGrabberBase grabber, HVRGrabbable grabbable)
Parameters
Type | Name | Description |
---|---|---|
HVRGrabberBase | grabber | |
HVRGrabbable | grabbable |
OnReleased(HVRGrabbable)
Declaration
protected override void OnReleased(HVRGrabbable grabbable)
Parameters
Type | Name | Description |
---|---|---|
HVRGrabbable | grabbable |
Overrides
| Improve this Doc View SourcePlaySFX(AudioClip)
Declaration
protected virtual void PlaySFX(AudioClip clip)
Parameters
Type | Name | Description |
---|---|---|
UnityEngine.AudioClip | clip |
PlaySocketedSFX(HVRSocketable)
Declaration
protected virtual void PlaySocketedSFX(HVRSocketable socketable)
Parameters
Type | Name | Description |
---|---|---|
HVRSocketable | socketable |
PlayUnsocketedSFX(HVRGrabbable)
Declaration
protected virtual void PlayUnsocketedSFX(HVRGrabbable grabbable)
Parameters
Type | Name | Description |
---|---|---|
HVRGrabbable | grabbable |
PositionGrabbable(HVRGrabbable)
Declaration
protected virtual void PositionGrabbable(HVRGrabbable grabbable)
Parameters
Type | Name | Description |
---|---|---|
HVRGrabbable | grabbable |
RotateGrabbable(HVRGrabbable)
Declaration
protected virtual void RotateGrabbable(HVRGrabbable grabbable)
Parameters
Type | Name | Description |
---|---|---|
HVRGrabbable | grabbable |
Start()
Declaration
protected override void Start()
Overrides
| Improve this Doc View SourceTryGrab(HVRGrabbable, Boolean, Boolean)
Declaration
public virtual bool TryGrab(HVRGrabbable grabbable, bool force = false, bool ignoreGrabSound = false)
Parameters
Type | Name | Description |
---|---|---|
HVRGrabbable | grabbable | |
System.Boolean | force | |
System.Boolean | ignoreGrabSound |
Returns
Type | Description |
---|---|
System.Boolean |
Update()
Declaration
protected override void Update()
Overrides
| Improve this Doc View SourceUpdateScale(HVRGrabbable)
Declaration
protected virtual void UpdateScale(HVRGrabbable grabbable)
Parameters
Type | Name | Description |
---|---|---|
HVRGrabbable | grabbable |