Dependencies



Dependencies are basically conditions upon which to depend.

Want the booster jet audio to be silent in the zero-gravity vacuum since there's no sound in space? Add a dependency to Booster Jet Audio with the requisite that the player is (not) within gravity zonage that is actually affecting them:

Dependencies are basically conditions used by modules to control their state, and often in combination. Dependencies describe logic based on the state of the rest of the toolkit. The following requires the player to be terrained and not skiing:

Modules using dependencies will show them in the inspector. Each dependency is defined by a requisition ("when" or "when not") and a requisite (state upon which to depend). Dependencies can be easily added, changed, and removed to enforce different conditions upon the module features asking for them.

When a dependencies setting includes no dependencies (array of size 0), it is treated as met. You can also achieve this via the dependency "When Always" or "When Not Never". The inverse also works: a dependencies setting for "When Not Always" or "When Never" will never be met.

Moon Motion provides dependencies for recognizing when the player is drifting, has a hand clipping through an object, is holding an object such as the Longbow, is hovering over an Interactable, is within a Gravity Zone, and much more.

You can also create your own dependencies to recognize custom game states. This can be done by extending the DependencyRequisite class and creating a corresponding asset. Try copying a dependency script/asset pair already made and editing it to create your own.