Custom Vehicle Controller
  • Custom Vehicle Controller
  • Guides
    • Workflow
      • Quick Setup
      • Creating New Parts
      • Modifying Parts
      • Creating Vehicle Parts Presets
      • Customizable Sets and Runtime Parts Change
      • Engine Performance Customization
      • Exposing Current Car Stats
    • API
      • CustomVehicleController
      • VehicleEngineSoundManager
      • RaceManager
      • RacerProgress
      • RaceSpawner
      • CollisionHandler
    • Vehicle Controller Input Provider
      • Input System Example
      • Mobile Input
    • Tips, Warnings and Requiremens
      • Work With Editor
      • Vehicle Set Up
    • AI Setup
      • AI Racer Creation
      • AI Racer Setup
      • AI Chaser Setup
      • Race Creation
      • Race Configuration
      • Race Information
    • Vehicle Damage System
      • Vehicle Damage Controller
      • Collision Area Partitioner
      • Part Damage Handler
      • Vehicle Attachments Aligner
      • Collision Handler
    • Additional Settings
      • Custom Vehicle Controller
      • Car Visuals Essentials
    • Package Settings
      • Assets Save Location
      • Project-Wide Surface Settings
    • Extra
      • Adding Visual Effects
        • Individual Effect Set Up
      • Adding Sound Effects
        • Adding Engine Sound
        • Adding Extra Sound Effects
  • Converting To Other Render Pipelines
    • Convert To Built-in RenderPipeline
    • Convert To HDRP RenderPipeline
Powered by GitBook
On this page
  1. Guides
  2. Workflow

Creating Vehicle Parts Presets

PreviousModifying PartsNextCustomizable Sets and Runtime Parts Change

Last updated 10 months ago

Creating new Presets

CustomVehicleController component can use an instance of a VehiclePartsPresetSO to work.

VehiclePartsPresetSO is a scriptable object that holds references to vehicle parts that make up a vehicle. Every part except Nitrous and Force Induction (sub-part of the engine) is required.

Make sure the "Use Preset" toggle is turned on (you can change the toggle value either in the inspector or editor window).

Go to Preset Settings in the editor window.

Enter a preset name and click the "Create New Preset Asset" button.

Presets are saved at "CustomVehicleController/VehicleController/VehicleParts/Presets".

Alternatively, you can create an instance by clicking RMB in the project folder of your choice -> Create -> CustomVehicleController -> VehicleParts -> VehiclePartsPreset.

If the GameObject with CustomVehicleController script is selected, the newly created preset instance will be assigned to it.

In this very same foldout you can select every vehicle part you want to make up a preset.

Alternatively, while the instance of vehicle preset is selected, changing object field values from the individual parts editors updates the used part instance.

However, as expected, if the same scriptable object is assigned to multiple scripts, changing its values affects every SO user. Because of this, upgrades to individual vehicles are not possible.

For this reason, a new approach is required. Learn to use customizable parts sets and update them at runtime here.