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

ActiveStateNot Class

Extends MonoBehaviour, IActiveState
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

Gets the inverted active state of the associated IActiveState.
True if the associated IActiveState is not active, false otherwise.

Protected Functions

virtual void Awake ( )
virtual void Start ( )

Member Functions

Injects the IActiveState dependency required by this component.
Parameters
activeState
The active state whose value will be inverted.
Injects the IActiveState dependency.
This method is designed to support dependency injection for unit testing.
Parameters
activeState
The active state to be inverted.
Did you find this page helpful?
Thumbs up icon
Thumbs down icon