CS8025 Error (Parsing Error)

Hello people

var defaultCameraAngle : float = 60;

On this line code, I am getting the CS8025 code error. I have no idea why…

It looks like you’re mixing up your scripting languages: the code you posted is Javascript, but the error you mention comes from the C# compiler.

If your script looks like this:

using UnityEngine;
using System.Collections;

var defaultCameraAngle : float = 60;

public class Foo : MonoBehaviour {
    //stuff
}

It needs to instead look like this:

using UnityEngine;
using System.Collections;

public Foo : MonoBehaviour {
    public float defaultCameraAngle = 60f;

    //stuff
}

If that’s not the problem, we might need more information.