using UnityEngine;
using System.Collections;
public class underWater : MonoBehaviour {
public float uwaterLevel=15f;
public Color normalColor;
public Color underWaterColor;
void Start () {
normalColor = new Color (0.5f,0.5f,0.5f,0.5f);
underWaterColor = new Color (0.22f,0.65f,0.77f,0.5f);
}
void Update () {
Debug.Log (uwaterLevel);
Debug.Log (transform.position.y);
if(Camera.main.transform.position.y
Подробнее здесь: [url]https://stackoverflow.com/questions/32233065/underwater-in-unity5[/url]