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

InteractorGroup Class

Extends MonoBehaviour, IInteractor
Base class from which you should inherit if you are creating an interactor group.
Interactor groups are collections of IInteractors which control the interactors within them, managing their execution and selecting which interactors are permitted to adopt which states. Information on the role and usage of interactor groups can be found in the documentation.

Protected Fields

List< UnityEngine.Object > _interactors[Get]
UnityEngine.Object _candidateComparer[Get]
ICandidateComparer CandidateComparer[Get]
bool _started[Get]

Fields

The list of IInteractors contained in and controlled by this interactor group.
Each interactor can only be in a single group to avoid conflicts from having multiple groups attempting to control the same interactor. This field is initialized during the MonoBehaviour start-up process from values set in the UnityEditor or through InjectInteractors(List<IInteractor>). Modifying the set of interactors in a group at runtime is not supported.
Implementation of IInteractorView.Data; for details, please refer to the related documentation provided for that interface.
Implementation of IInteractorView.Identifier; for details, please refer to the related documentation provided for that interface.

Properties

This is an internal API which sets or retrieves the maximum number of times the interactor group will execute its processing loop (assessing and enacting changes in the groups InteractorState, among other effects) within a single frame.
The implications of this are complex, and depending on or modifying this value is not recommended.
Implementation of IUpdateDriver.IsRootDriver; for details, please refer to the related documentation provided for that interface.
Implementation of IInteractor.ShouldHover; for details, please refer to the related documentation provided for that interface.
Implementation of IInteractor.ShouldUnhover; for details, please refer to the related documentation provided for that interface.
Implementation of IInteractor.ShouldSelect; for details, please refer to the related documentation provided for that interface.
Implementation of IInteractor.ShouldUnselect; for details, please refer to the related documentation provided for that interface.
Implementation of IInteractorView.HasCandidate; for details, please refer to the related documentation provided for that interface.
Implementation of IInteractorView.HasInteractable; for details, please refer to the related documentation provided for that interface.
Implementation of IInteractorView.HasSelectedInteractable; for details, please refer to the related documentation provided for that interface.
abstract object CandidateProperties[Get]
Implementation of IInteractorView.State; for details, please refer to the related documentation provided for that interface.

Events

Implementation of IInteractorView.WhenStateChanged; for details, please refer to the related documentation provided for that interface.
Implementation of IInteractorView.WhenPreprocessed; for details, please refer to the related documentation provided for that interface.
Implementation of IInteractorView.WhenProcessed; for details, please refer to the related documentation provided for that interface.
Implementation of IInteractorView.WhenPostprocessed; for details, please refer to the related documentation provided for that interface.

Object Data for protected-static-attrib

static readonly InteractorPredicate TruePredicate[Get]
static readonly InteractorPredicate HasCandidatePredicate[Get]
static readonly InteractorPredicate HasInteractablePredicate[Get]

Member Functions

Implementation of IInteractor.Hover; for details, please refer to the related documentation provided for that interface.
Implementation of IInteractor.Unhover; for details, please refer to the related documentation provided for that interface.
Implementation of IInteractor.Select; for details, please refer to the related documentation provided for that interface.
Implementation of IInteractor.ShouldUnselect; for details, please refer to the related documentation provided for that interface.
Implementation of IInteractor.Preprocess; for details, please refer to the related documentation provided for that interface.
Implementation of IInteractor.Process; for details, please refer to the related documentation provided for that interface.
Implementation of IInteractor.Postprocess; for details, please refer to the related documentation provided for that interface.
Implementation of IInteractor.ProcessCandidate; for details, please refer to the related documentation provided for that interface.
Implementation of IInteractor.Enable; for details, please refer to the related documentation provided for that interface.
Implementation of IInteractor.Disable; for details, please refer to the related documentation provided for that interface.
Implementation of IUpdateDriver.Drive; for details, please refer to the related documentation provided for that interface.
Convenience method that injects all required dependencies for a dynamically instantiated InteractorGroup; because only one dependency is required, this method simlpy wraps InjectInteractors(List<IInteractor>).
This method exists to support Interaction SDK's dependency injection pattern and is not needed for typical Unity Editor-based usage.
Adds a list of IInteractors to a dynamically instantiated InteractorGroup.
This method exists to support Interaction SDK's dependency injection pattern and is not needed for typical Unity Editor-based usage.
Adds an IActiveState to a dynamically instantiated InteractorGroup.
This method exists to support Interaction SDK's dependency injection pattern and is not needed for typical Unity Editor-based usage.
Adds an ICandidateComparer to a dynamically instantiated InteractorGroup.
This method exists to support Interaction SDK's dependency injection pattern and is not needed for typical Unity Editor-based usage.

Protected Functions

delegate bool InteractorPredicate
( IInteractor interactor,
int index )
virtual void Awake ( )
virtual void Start ( )
virtual void OnEnable ( )
virtual void OnDisable ( )
virtual void OnDestroy ( )
bool TryGetBestCandidateIndex
( InteractorPredicate predicate,
out int bestCandidateIndex,
int betterThan,
int skipIndex )
bool AnyInteractor
( InteractorPredicate predicate )
int CompareCandidates
( int indexA,
int indexB )
void DisableAllExcept
( IInteractor mainInteractor )
void EnableAllExcept
( IInteractor mainInteractor )
bool UpdateActiveState ( )
virtual void Update ( )

Object Data for protected-static-func

Compares two InteractorStates indicating which one is higher in the Active State chain
Parameters
a
First state to compare
b
Seconds state to compare
Returns
1 if b is higher than a, -1 if a is higher than b. 0 of they are equal
Did you find this page helpful?
Thumbs up icon
Thumbs down icon