Testing your Vehicle - NeisesMike/VehicleFramework GitHub Wiki
When you start the game, your mod will try to register your vehicle with Vehicle Framework. But things don't always go right the first time. If you're like me, you will probably have a "transform.Find" problem at least once. Double check your transform paths!
After the main menu appears, don't even start a game. Open the BepInEx log and do ctrl+f for your vehicle's name. If everything went well, you should see a line like this:
[Info :VehicleFramework] Finished Cricket registration.
But chances are good that you'll see some errors. Vehicle Framework will often provide you with a helpful message indicating what probably went wrong. But if you got a "transform.Find" wrong, you might see an error like this:
[Error :VehicleFramework] Wraith: Exception Caught. Likely this ModVehicle is not implementing something it must. Check the abstract features of ModVehicle.
System.NullReferenceException: Object reference not set to an instance of an object
at WraithJet.Wraith.get_CanopyWindows () [0x00017] in <b70ab814beb64845bc41a7ecf270c80c>:0
at VehicleFramework.VehicleRegistrar.ValidateRegistration (VehicleFramework.ModVehicle mv) [0x002ce] in <ed84f51d16b641278436f5b944144fba>:0
The above error indicates that the vehicle failed to find its CanopyWindows. Specifically, there was a null de-reference in the getter for CanopyWindows. If any of your vehicle's getters failed, that's your error to fix, and probably it was a bad transform.Find call. Make sure your C# matches the prefab you exported from Unity Editor.
Here's another example of an error you might see:
[Error :VehicleFramework] Wraith: A headlight was missing its VolumetricLight.
[Error :VehicleFramework] Invalid Submersible Registration for the Wraith. Next.
In this case, you provided a headlight but didn't provide a VolumetricLight. VF won't allow that because its weird to see a light without the visible cone. Go back and add the volumetric light and try again.