getting error at starting the game :
NullReferenceException: Object reference not set to an instance of an object
Invector.CharacterController.v_car_camera_control.LateUpdate () (at Assets/VehiclesAddOn/Core Files/scripts/InvectorPlayer/v_car_camera_control.cs:42)
i tried to fit it but it didnt work >(
The solution is here buddy, good luck! ;)
Oh and pls thank danielmalencar for the solution ;)
FIX TO SHOOTER MELEE 1.1.2 VERSION:
/////////////////////////////////////////////////////////////////////////////////////////////
ERROR
NullReferenceException: Object reference not set to an instance of an object
Invector.CharacterController.v_car_camera_control.LateUpdate () (at Assets/VehiclesAddOn/Core Files/scripts/InvectorPlayer/v_car_camera_control.cs:42)
///////////////////////////////////////////////////////////////////////////////////////////////
In v_car_camera_control.cs replace:
#region If Vehicle is not in Garage
if (this.GetComponentInParent<V_car_user>().inGarage == false && doCamOnce == false)
{
tpCamera.ChangeState(this.GetComponentInParent<V_car_user>().CarCameraStateSystem.inGarage_camerastate, false);
tpCamera.ChangeState(lastState, true);
doCamOnce = true;
}
#endregion
WITH THIS:
#region If Vehicle is not in Garage
if (this.GetComponentInParent<V_car_user>().inGarage == false && doCamOnce == false)
{
if(tpCamera==null)
return;
tpCamera.ChangeState(this.GetComponentInParent<V_car_user>().CarCameraStateSystem.inGarage_camerastate, false);
tpCamera.ChangeState(lastState, true);
doCamOnce = true;
}
#endregion
AND
REPLACE:
void CameraInputVehicle()
{
//borrowed from Malbers invector code for his horse pro asset merge. Posted on invectors website
return;
var Y = rotateCameraYInput.GetAxis();
var X = rotateCameraXInput.GetAxis();
var zoom = cameraZoomInput.GetAxis();
WITH THIS:
void CameraInputVehicle()
{
//borrowed from Malbers invector code for his horse pro asset merge. Posted on invectors website
var Y = rotateCameraYInput.GetAxis();
var X = rotateCameraXInput.GetAxis();
var zoom = cameraZoomInput.GetAxis();
Thanks.