Obviously im in need of some help here. i need to know why im getting an error on one of my scripts. im getting a “Unexpected Token: :.” but im having a hard time cause i know where it is at it just wont work for me. please someone help me out here.
Here is my code right now. the error is on the first line i dont know what is wrong with it.
public class Swimmer : MonoBehaviour{
// Use this for initialization;
void Start () {
RenderSettings.fog = false;
RenderSettings.fogColor = new Color(0.5f);
RenderSettings.fogDensity = 0.04f;
}
bool IsUnderwater()
{
return gameObject.transform.position.y < 0;
}
void Update () {
RenderSettings.fog = IsUnderwater();
}
}