mouselook offsety not found

Hi,

I recently updated unity to v3.4 and I started getting errors in scripts.

One of these errors is this:

MissingFieldException: Field ‘MouseLook.offsetY’ not found.

When I click it, it takes me to this code in gunscript.js:

function Kickback () {
	mainCam.GetComponent("MouseLook").offsetY = kickbackAngle;
	weaponCam.GetComponent("MouseLook").offsetY = kickbackAngle;

Any help please?

See if the information about script compilation work for you.

This allows you to let different scripting languages interoperate. For example, if you want to create a Javascript that uses a C# script: place the C# script in the “Standard Assets” folder and the Javascript outside of the “Standard Assets” folder. The Javascript can now reference the C# script directly.

Basically, create a folder called “Standard Assets” and place your MouseLook.cs in there.

If it still doesn’t work, make sure MouseLook has “offsetY” and not “OffsetY” or something similar. Check the spelling…