Class ModuleTemplateWrapper
MonoBehaviour wrapper for the ModuleTemplate module.
Namespace: NWH.VehiclePhysics2.Modules.ModuleTemplate
Assembly: NWH.VehiclePhysics2.dll
Syntax
[Serializable]
public class ModuleTemplateWrapper : ModuleWrapper
Remarks
Writing a wrapper: give it a public field literally named "module" of your module type, since the shared wrapper inspector looks it up by name, then implement GetModule and SetModule. Name the class {ModuleName}Wrapper and put it on a GameObject with a VehicleController.
Fields
module
The ModuleTemplate instance.
Declaration
public ModuleTemplate module
Field Value
| Type | Description |
|---|---|
| ModuleTemplate |
Methods
GetModule()
Gets the wrapped module as a VehicleComponent.
Declaration
public override VehicleComponent GetModule()
Returns
| Type | Description |
|---|---|
| VehicleComponent | The ModuleTemplate instance cast to VehicleComponent |
Overrides
SetModule(VehicleComponent)
Sets the wrapped module from a VehicleComponent reference.
Declaration
public override void SetModule(VehicleComponent module)
Parameters
| Type | Name | Description |
|---|---|---|
| VehicleComponent | module | The VehicleComponent to wrap, must be a ModuleTemplate instance |