Troubleshooting

How do I stop vehicles jumping between two colliders?

Vehicles can sometimes bounce on the join of two ground colliders with the default physics settings. Change the ‘Default Contact Offset’ in 'Project Setings' -> 'Physics'. It runs great for me with the value set to 0.0001.

Why is my vehicle moving very slowly or not at all?

As of v1.5 AVC requires a LayerMask to be set for the ground, by default this should be set to “Default”. On your vehicle settings check what the ‘Ground Mask’ is set as and correct this to what your ground layer is set as.

Why do I get a NullReferenceException in the console?

There can sometimes be a null reference appear in the console, linked to the Vehicle Builder Window, this appears to be a Unity bug and can be ignored. (https://forum.unity.com/threads/assetdatabase-saveassets-is-giving-a-nullreferenceexception.778691/). Closing the Vehicle Builder Window when you’re done with it should stop the error appearing.

NullReferenceException: Object reference not set to an instance of an object
UnityEditor.GameObjectInspector.ClearPreviewCache () (at /Users/builduser/buildslave/unity/build/Editor/Mono/Inspector/GameObjectInspector.cs:211)
UnityEditor.GameObjectInspector.OnDisable () (at /Users/builduser/buildslave/unity/build/Editor/Mono/Inspector/GameObjectInspector.cs:199)
UnityEditor.AssetDatabase:SaveAssets()
e23.VehicleController.Editor.VehiclePrefabBuilderEditorWindow:SavePrefabSetup() (at Assets/e23/SimpleCarController/Scripts/Editor/VehiclePrefabBuilderEditorWindow.cs:475)
e23.VehicleController.Editor.VehiclePrefabBuilderEditorWindow:OnDisable() (at Assets/e23/SimpleCarController/Scripts/Editor/VehiclePrefabBuilderEditorWindow.cs:63)

Why don't my wheels rotate correctly?

This can happen when the pivot of the wheel model isn’t set in the way the AVC is expecting it. Create an empty GameObject, position it in the same place as the wheel, and then place the model as a child of the GameObject – renaming the new parent as your search term.

If you are correcting an already built vehicle, make sure to assign the new parent object to the correct wheel transform on the VehicleBehaviour component. Use the Wheel Fixer tool to solve this issue.

How do I fix the 'nameof operator' console error?

If the below error is showing in the console, you need to change the projects ‘Scripting Runtime Version’ to ‘.NET 4.x Equivalent’. This can be found in Player Settings -> Other Settings -> Configuration.

Feature `nameof operator' cannot be used because it is not part of the C# 4.0 language specification

Last updated