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

ActiveStateNot Class

Extends MonoBehaviour
Provides a logical NOT operation on an IActiveState to invert its active state.
This class is useful in scenarios where the activation condition needs to be negated.
The ActiveStateNot class is a component that can be attached to any GameObject in a Unity scene. It requires a reference to another object that implements the IActiveState interface. The active state of this referenced object is then logically inverted, meaning if the referenced state is active, Active will return false, and vice versa. This inversion is useful in cases where the absence of a condition should trigger an interaction or event, without needing to write additional code to handle this logic explicitly.

Fields

Active : bool
Gets the inverted active state of the associated IActiveState.
True if the associated IActiveState is not active, false otherwise.
Signature
bool Oculus.Interaction.ActiveStateNot.Active

Protected Methods

Awake ()
Signature
virtual void Oculus.Interaction.ActiveStateNot.Awake()
Returns
void
Start ()
Signature
virtual void Oculus.Interaction.ActiveStateNot.Start()
Returns
void

Methods

InjectActiveState ( activeState )
Injects the IActiveState dependency.
This method is designed to support dependency injection for unit testing.
Signature
void Oculus.Interaction.ActiveStateNot.InjectActiveState(IActiveState activeState)
Parameters
activeState: IActiveState  The active state to be inverted.
Returns
void
InjectAllActiveStateNot ( activeState )
Injects the IActiveState dependency required by this component.
Signature
void Oculus.Interaction.ActiveStateNot.InjectAllActiveStateNot(IActiveState activeState)
Parameters
activeState: IActiveState  The active state whose value will be inverted.
Returns
void