Creating Vehicle Parts Presets
Last updated
Last updated
CustomVehicleController component can use an instance of a VehiclePartsPresetSO to work.
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.
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.