Skip to content
Snippets Groups Projects
Commit a0fda7ac authored by Stefan Richter's avatar Stefan Richter
Browse files

AutoOS und AutoSettingsAdaption Bug fixes

parent f3b4a8e2
No related branches found
No related tags found
No related merge requests found
......@@ -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;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment