Astra Child

Mody Module

Estimated reading: 2 minutes 0 views

A Mody Module is a building block of the Mody system that contains actions and events that can be triggered in response to a given condition. A module is designed to be flexible, reusable and easily configurable, which allows for rapid prototyping and efficient development.

How to create a Mody Module

To create a Mody Module, you can use the UnityEventModule as an example. Here is a step-by-step guide on how to create your own module:

  1. Create a new C# script and name it after your module.
  2. Inherit from the ModyModule class.
  3. Define any public variables that you want to be exposed in the Inspector.
  4. Override the SetupActions method and add the actions you want your module to contain. Each action is an instance of a class that inherits from the ModyAction class.
  5. Implement the logic for each action.
  6. Add any necessary events to your module. Each event is an instance of a class that inherits from the ModyEvent class.
  7. Implement the logic for each event.
  8. When your module is complete, add it to your project as a new component.

Congratulations! You have just created a Mody Module. Now you can use it to create dynamic behaviors in your Unity project.

Share this Doc
CONTENTS
Scroll to Top