Class HandInteractionHint
This class provides wrapper functionality for triggering animations and fades for the hand rig.
Namespace: Microsoft.MixedReality.Toolkit.Experimental.UI
Assembly: cs.temp.dll.dll
Syntax
public class HandInteractionHint : MonoBehaviour
Fields
CustomShouldHideVisuals
Custom function to determine visibility of visuals. Return true to hide visuals and reset min timer (max timer will still be in effect), return false when user is doing nothing and needs a hint.
Declaration
public Func<bool> CustomShouldHideVisuals
Field Value
Type | Description |
---|---|
Func<Boolean> |
Properties
AnimationState
Name of animation to play during loop.
Declaration
public string AnimationState { get; set; }
Property Value
Type | Description |
---|---|
String |
AutoActivate
If true, logic runs whenever this component is active. If false, you must manually start the logic with StartShowTimer.
Declaration
public bool AutoActivate { get; set; }
Property Value
Type | Description |
---|---|
Boolean |
HideIfHandTracked
React to hand tracking state to hide visuals when hands are being tracked. If false, only the customShouldHideHands function will be evaluated.
Declaration
public bool HideIfHandTracked { get; set; }
Property Value
Type | Description |
---|---|
Boolean |
MaxDelay
Max delay for showing the visuals. If the user's hands are in view, the min timer will reset to 0, but the visuals will appear after max seconds.
Declaration
public float MaxDelay { get; set; }
Property Value
Type | Description |
---|---|
Single |
MinDelay
Min delay for showing the visuals. If the user's hands are not in view, the visuals will appear after min seconds.
Declaration
public float MinDelay { get; set; }
Property Value
Type | Description |
---|---|
Single |
RepeatDelay
Time to wait between repeats in seconds.
Declaration
public float RepeatDelay { get; set; }
Property Value
Type | Description |
---|---|
Single |
Repeats
Number of times to repeat the hint before fading out and waiting for timer again.
Declaration
public int Repeats { get; set; }
Property Value
Type | Description |
---|---|
Int32 |
UseMaxDelay
Set to false if you don't want to use a max timer and only want to show the hint when user's hands are not tracked.
Declaration
public bool UseMaxDelay { get; set; }
Property Value
Type | Description |
---|---|
Boolean |
VisualsRoot
Declaration
public GameObject VisualsRoot { get; set; }
Property Value
Type | Description |
---|---|
GameObject |
Methods
GetAnimationDuration(String)
Gets the duration of the animation name passed in, or 0 if the state name is not found.
Declaration
public float GetAnimationDuration(string animationStateName)
Parameters
Type | Name | Description |
---|---|---|
String | animationStateName |
Returns
Type | Description |
---|---|
Single |
StartHintLoop()
Starts the hint loop logic.
Declaration
public void StartHintLoop()
StopHintLoop()
Fades out the hint and stops the hint loop logic
Declaration
public void StopHintLoop()