Interface IXRInteractionOverrideGroup
An interface that represents an Interaction Group component that is capable of overriding the interaction of the
active
Inherited Members
Namespace: UnityEngine .XR.Interaction.Toolkit.Interactors
Assembly: Unity.XR.Interaction.Toolkit.dll
Syntax
[MovedFrom("UnityEngine.XR.Interaction.Toolkit")]
public interface IXRInteractionOverrideGroup : IXRInteractionGroup
Methods
AddInteractionOverrideForGroupMember(IXRGroupMember, IXRGroupMember)
Adds overrideGroupMember
as a possible interaction override for sourceGroupMember
.
Declaration
void AddInteractionOverrideForGroupMember(IXRGroupMember sourceGroupMember, IXRGroupMember overrideGroupMember)
Parameters
Type | Name | Description |
---|---|---|
IXRGroup |
sourceGroupMember | The Group member whose interaction can be potentially overridden by |
IXRGroup |
overrideGroupMember | The Group member to add as a possible interaction override. |
Remarks
Both members must be registered with the Group. Additionally, overrideGroupMember
must
implement either IXRSelectsourceGroupMember
. Use the
implementation of Group
See Also
ClearInteractionOverridesForGroupMember(IXRGroupMember)
Clears the set of possible interaction overrides for sourceGroupMember
.
Declaration
bool ClearInteractionOverridesForGroupMember(IXRGroupMember sourceGroupMember)
Parameters
Type | Name | Description |
---|---|---|
IXRGroup |
sourceGroupMember | The Group member whose interaction can no longer be overridden. |
Returns
Type | Description |
---|---|
bool | Returns true if there is a set of overrides for |
Remarks
sourceGroupMember
must be registered with the Group.
See Also
GetInteractionOverridesForGroupMember(IXRGroupMember, HashSet<IXRGroupMember>)
Returns all members in the set of possible interaction overrides for sourceGroupMember
into set results
.
Declaration
void GetInteractionOverridesForGroupMember(IXRGroupMember sourceGroupMember, HashSet<IXRGroupMember> results)
Parameters
Type | Name | Description |
---|---|---|
IXRGroup |
sourceGroupMember | The Group member whose overrides to get. |
Hash |
results | Set to receive override Group members. |
Remarks
sourceGroupMember
must be registered with the Group.
This method populates the set with the Group members at the time the method is called. It is not a live view,
meaning override Group members added or removed afterward will not be reflected in the results of this method.
Clears results
before adding to it.
See Also
GroupMemberIsPartOfOverrideChain(IXRGroupMember, IXRGroupMember)
Checks whether potentialOverrideGroupMember
is either the same as sourceGroupMember
or part of a chain of its override Group members and their overrides.
Declaration
bool GroupMemberIsPartOfOverrideChain(IXRGroupMember sourceGroupMember, IXRGroupMember potentialOverrideGroupMember)
Parameters
Type | Name | Description |
---|---|---|
IXRGroup |
sourceGroupMember | The source Group member for the potential chain of override members. |
IXRGroup |
potentialOverrideGroupMember | The Group member to check for as part of a chain of overrides. |
Returns
Type | Description |
---|---|
bool | Returns true if |
See Also
RemoveInteractionOverrideForGroupMember(IXRGroupMember, IXRGroupMember)
Removes overrideGroupMember
as a possible interaction override for sourceGroupMember
.
Declaration
bool RemoveInteractionOverrideForGroupMember(IXRGroupMember sourceGroupMember, IXRGroupMember overrideGroupMember)
Parameters
Type | Name | Description |
---|---|---|
IXRGroup |
sourceGroupMember | The Group member whose interaction can no longer be overridden by |
IXRGroup |
overrideGroupMember | The Group member to remove as a possible interaction override. |
Returns
Type | Description |
---|---|
bool | Returns true if |
Remarks
sourceGroupMember
must be registered with the Group.
See Also
ShouldAnyMemberOverrideInteraction(IXRInteractor, out IXRSelectInteractor)
Checks whether any member of the Group should override the interactions of interactingInteractor
.
An interactor should only override if it is capable of selecting any interactable that interactingInteractor
is interacting with. If multiple Group members are capable of overriding, only the highest priority one should override.
Declaration
bool ShouldAnyMemberOverrideInteraction(IXRInteractor interactingInteractor, out IXRSelectInteractor overridingInteractor)
Parameters
Type | Name | Description |
---|---|---|
IXRInteractor | interactingInteractor | The interactor that is interacting with an interactable. |
IXRSelect |
overridingInteractor | The interactor that should override interaction. |
Returns
Type | Description |
---|---|
bool | Returns true if any member of the Group should override the interactions of
|
Remarks
The implementation of this method should call this method on each Group member that is an
IXRInteraction
See Also
ShouldOverrideActiveInteraction(out IXRSelectInteractor)
Checks whether the Group should end the interactions of the active
Declaration
bool ShouldOverrideActiveInteraction(out IXRSelectInteractor overridingInteractor)
Parameters
Type | Name | Description |
---|---|---|
IXRSelect |
overridingInteractor | The interactor that should override interaction. |
Returns
Type | Description |
---|---|
bool | Returns true if the Group should end the interactions of the
active |
Remarks
The implementation of UpdateoverridingInteractor
should
override the pre-prioritized interactor.
The implementation of this method should call Should