diff --git a/Assets/Scripts/UI/NetwMenue/StartMenue_mobile.cs b/Assets/Scripts/UI/NetwMenue/StartMenue_mobile.cs index 3deb88cbec91917e0de82f976220f3ceb0122392..c5201a093a951c6b0850b85580869e5b8811746e 100644 --- a/Assets/Scripts/UI/NetwMenue/StartMenue_mobile.cs +++ b/Assets/Scripts/UI/NetwMenue/StartMenue_mobile.cs @@ -35,7 +35,6 @@ private void Awake() ScreenOptimization(); toChild1(); - if (checkOperationSystemAlreadyDone == false || checkOperationSystemAlreadyDone_check == false) { start2_CheckOS_CheckConfig(); @@ -70,9 +69,13 @@ void start2_CheckOS_CheckConfig() { //Debug.Log("initialReset_PDP"); ResetPersistentDataPath(); + checkOS(); changeSettingsToOS(); NetworkJSON_Save(); } + //Save CheckOS + NetworkJSON_Save(); + if (autoSettingsAdaption) { changeSettingsToOS(); @@ -118,22 +121,29 @@ void checkOS() void checkOS2() { //https://docs.unity3d.com/ScriptReference/RuntimePlatform.html + + if (Application.platform == RuntimePlatform.WindowsPlayer) { - Debug.Log("Windows OS detected"); + //Debug.Log("Windows OS detected"); CommunicationEvents.Opsys = OperationSystem.Windows; return; } if (Application.platform == RuntimePlatform.Android) { - Debug.Log("Android OS detected"); - CommunicationEvents.Opsys = OperationSystem.Windows; + //Debug.Log("Android OS detected"); + CommunicationEvents.Opsys = OperationSystem.Android; return; } - + if (Application.platform == RuntimePlatform.WindowsEditor) + { + CommunicationEvents.Opsys = OperationSystem.Windows; + return; + } + Debug.Log("Detecting OS: " + Application.platform + " -> " + CommunicationEvents.Opsys); //Default: //CommunicationEvents.Opsys = CommunicationEvents.Opsys_Default;