Module Managers

The Module Manager component is a base class for any component that stores, uses, or operates modules loaded at a vehicle's module mounts. This base class provides an easy way to be notified when a module is mounted or unmounted anywhere on the vehicle.

This is useful if you're adding your own custom component on the vehicle that does something based on the presence of specific modules on the vehicle.

To utilize this, first create your own script that extends the Module Manager class instead of the default MonoBehaviour.

Now, you can override these functions:

// This function is called when a module is mounted anywhere on the vehicle
protected override void OnModuleMounted(Module module)
{
    // Do something with the module
}


// This function is called when a module is unmounted anywhere on the vehicle
protected override void OnModuleUnmounted(Module module)
{
    // Do something with the module
}

Last updated