void Update() { if (Input.GetKeyDown(KeyCode.R)) { if (!radarSystem) { radarSystem = FindObjectOfType <RadarSystem>(); } radarSystem.settings.rotateRadar = !radarSystem.settings.rotateRadar; } if (Input.GetKeyDown(KeyCode.L)) { if (Cursor.visible) { Cursor.lockState = CursorLockMode.Locked; Cursor.visible = false; } else { Cursor.lockState = CursorLockMode.None; Cursor.visible = true; } } }
public override void OnInspectorGUI() { DrawDefaultInspector(); RadarSystem radarSystem = target as RadarSystem; if (radarSystem.pauseBetweenUpdatesValue < 0.1f) { EditorGUILayout.HelpBox("Small update pause can decrease performance.", MessageType.Warning); } }