NWH Vehicle Physics 2
Search Results for

    Show / Hide Table of Contents

    Class ModuleTemplateWrapper

    MonoBehaviour wrapper for the ModuleTemplate module.

    Inheritance
    object
    Object
    Component
    Behaviour
    MonoBehaviour
    ModuleWrapper
    ModuleTemplateWrapper
    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
    ModuleWrapper.GetModule()

    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

    Overrides
    ModuleWrapper.SetModule(VehicleComponent)
    In this article
    Back to top Copyright © NWH - Vehicle Physics, Aerodynamics, Dynamic Water Physics