API reference
API reference
Select your platform
No SDKs available
No versions available

Sequence Class

Extends MonoBehaviour
Chains together a number of IActiveStates into a sequence.
The Sequence._stepsToActivate field contains an optional list of IActiveState's which must be 'activated' in order. The sequence can progress from Step N to N + 1 when: MinActiveTime <= "Time step N active for" <= MaxStepTime, and: Step N just became inactive OR Step N is the last step OR Step N+1 is active
Note that once the sequence has moved on to the next step, the previous step does not need to remain active. Each step has three fields: ActiveState: The IActiveState that is used to determine if the conditions of this step are fulfilled MinActiveTime: How long (in seconds) the IActiveState of this step must be contiguously active before moving on to the next step. If the ActiveState drops out of being active for even a single frame the countdown is reset. MaxStepTime: If the elapsed time that the sequence is spent waiting for this step to reach its MinActiveTime exceeds this value then the whole sequence is reset back to the beginning.
Once all steps are complete the Sequence.Active becomes true. It will remain true as long as RemainActiveWhile is true. If _remainActiveCooldown > 0, Sequence.Active will remain active even after RemainActiveWhile becomes false until the cooldown timer is met. The timer is reset if RemainActiveWhile becomes true again.

Properties

Active : bool
[Get]
Signature
bool Oculus.Interaction.PoseDetection.Sequence.Active
CurrentActivationStep : int
[Get]
Returns the index of the step in _stepsToActivate whose conditions are waiting to be activated.
If Active is true, this value will be set to the size of _stepsToActivate. If _stepsToActivate has no steps, this property will be 0.
Signature
int Oculus.Interaction.PoseDetection.Sequence.CurrentActivationStep

Protected Methods

Awake ()
Signature
virtual void Oculus.Interaction.PoseDetection.Sequence.Awake()
Returns
void
Start ()
Signature
virtual void Oculus.Interaction.PoseDetection.Sequence.Start()
Returns
void
Update ()
Signature
virtual void Oculus.Interaction.PoseDetection.Sequence.Update()
Returns
void

Methods

InjectOptionalRemainActiveWhile ( activeState )
Signature
void Oculus.Interaction.PoseDetection.Sequence.InjectOptionalRemainActiveWhile(IActiveState activeState)
Parameters
activeState: IActiveState
Returns
void
InjectOptionalStepsToActivate ( stepsToActivate )
Signature
void Oculus.Interaction.PoseDetection.Sequence.InjectOptionalStepsToActivate(ActivationStep[] stepsToActivate)
Parameters
stepsToActivate: ActivationStep[]
Returns
void
InjectOptionalTimeProvider ( timeProvider )
Signature
void Oculus.Interaction.PoseDetection.Sequence.InjectOptionalTimeProvider(Func< float > timeProvider)
Parameters
timeProvider: Func< float >
Returns
void
SetTimeProvider ( timeProvider )
Sets a function that returns the current time in seconds.
Signature
void Oculus.Interaction.PoseDetection.Sequence.SetTimeProvider(Func< float > timeProvider)
Parameters
timeProvider: Func< float >
Returns
void

Inner Class

ActivationStep Class

Constructors

ActivationStep ()
Signature
Oculus.Interaction.PoseDetection.Sequence.ActivationStep.ActivationStep()
ActivationStep ( activeState , minActiveTime , maxStepTime )
Signature
Oculus.Interaction.PoseDetection.Sequence.ActivationStep.ActivationStep(IActiveState activeState, float minActiveTime, float maxStepTime)
Parameters
activeState: IActiveState
minActiveTime: float
maxStepTime: float

Properties

ActiveState : IActiveState
[Get]
Signature
IActiveState Oculus.Interaction.PoseDetection.Sequence.ActivationStep.ActiveState
MaxStepTime : float
[Get]
Signature
float Oculus.Interaction.PoseDetection.Sequence.ActivationStep.MaxStepTime
MinActiveTime : float
[Get]
Signature
float Oculus.Interaction.PoseDetection.Sequence.ActivationStep.MinActiveTime

Methods

Start ()
Signature
void Oculus.Interaction.PoseDetection.Sequence.ActivationStep.Start()
Returns
void