VehicleComponents
, such as EngineComponent
or GroundDetectionComponent
. This includes the modules. Each of the VehicleComponents
can have a LOD setting and can be Disabled/Enabled.StateSettings
is a ScriptableObject
containing info about LODs and Enabled/Disabled state of each VehicleComponent
. The aim of StateSettings
is to prevent having to set the state of each VehicleComponent
on each VehicleController
individually.StateSettings
can be assigned through the Settings tab of VehicleController
.For more info about VehicleComponents and their states and LODs check VehicleComponent page.
lodIndex >= 0
) a piece of code is run each frame to check if the lodIndex
of the component is less or equal to the VehicleController
's activeLodIndex
. lodIndex
is less or equal to activeLodIndex
the component will be enabled, otherwise disabled.ENABLED
button for that component and enables/disables the component based on LOD settings and the distance from the camera.VehicleComponent
loads state from StateSettings
. This is only done once, on vehicle initialization, so the StateSettings
can also be thought of as initial vehicle component state settings.