From 0209b0655dd3bbf6712f4fcb4cd64b367b632e57 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alptu=C4=9F=20C=C4=B1r=C4=B1t?= Date: Fri, 16 Aug 2024 16:51:13 +0300 Subject: [PATCH] check for key MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Alptuğ Cırıt --- Assets/AWSIM/Scripts/UI/GraphicsSettings.cs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Assets/AWSIM/Scripts/UI/GraphicsSettings.cs b/Assets/AWSIM/Scripts/UI/GraphicsSettings.cs index 91a1512ac..f6f7835ae 100644 --- a/Assets/AWSIM/Scripts/UI/GraphicsSettings.cs +++ b/Assets/AWSIM/Scripts/UI/GraphicsSettings.cs @@ -36,7 +36,10 @@ public class GraphicsSettings : MonoBehaviour private void Awake() { // Initialize PlayerPref Keys - PlayerPrefs.SetInt(UserGraphicsQualityKey, -1); + if (!PlayerPrefs.HasKey(UserGraphicsQualityKey)) + { + PlayerPrefs.SetInt(UserGraphicsQualityKey, -1); + } } private void Start()