Quick Start
After adding Modula to your project, it’s time to make your first module!
Making example behaviour
Step 1 - create new main script that supports modules:
- Create new MonoBehaviour script
- use namespace
Modula
- change inheritance to
ModularBehaviour
Step 2 - create your first module
- Create new MonoBehaviour script
- use namespace
Modula
- change inheritance to
Module
Step 3 - add support for ExampleModule
in ModularExample
- Get back to your behaviour script
- Override
AvailableModules
field
Step 4 - create GameObject for your new behaviour
- in Unity, go to Hierarchy window > “+” > Create Empty
- select the created object
- click “Add Component” > ModularExample
Done! now you can add or remove your module in Inspector window by clicking “Add ExampleModule” / “Remove”