using UnityEngine; public class WaveHeightSetting : MonoBehaviour { public GUIStyle Normal; public RealWater WaterPlane; private float native_width = 1920f; private float native_height = 1080f; private void OnGUI() { float x = (float)Screen.width / native_width; float y = (float)Screen.height / native_height; GUI.matrix = Matrix4x4.TRS(new Vector3(0f, 0f, 0f), Quaternion.identity, new Vector3(x, y, 1f)); GUI.Label(new Rect(57.6f, 399.6f, 288f, 43.2f), "Wave height: ", Normal); WaterPlane.WaveHeight = GUI.HorizontalSlider(new Rect(230.4f, 410.4f, 288f, 32.399998f), WaterPlane.WaveHeight, -0.1f, -5f); } }