Mody Module
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:
- Create a new C# script and name it after your module.
- Inherit from the ModyModule class.
- Define any public variables that you want to be exposed in the Inspector.
- 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.
- Implement the logic for each action.
- Add any necessary events to your module. Each event is an instance of a class that inherits from the ModyEvent class.
- Implement the logic for each event.
- 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.