diff --git a/Assets/Resources/Prefabs/UI/NetwMenu/OptionsM.prefab b/Assets/Resources/Prefabs/UI/NetwMenu/OptionsM.prefab index 3721bc37a020d9353b40fc079a92ec7f0800cb15..2ea00eb00526c69697e72fcb6a50f2cd3d2ce96d 100644 --- a/Assets/Resources/Prefabs/UI/NetwMenu/OptionsM.prefab +++ b/Assets/Resources/Prefabs/UI/NetwMenu/OptionsM.prefab @@ -17448,7 +17448,7 @@ GameObject: m_Icon: {fileID: 0} m_NavMeshLayer: 0 m_StaticEditorFlags: 0 - m_IsActive: 1 + m_IsActive: 0 --- !u!224 &178559033428688118 RectTransform: m_ObjectHideFlags: 0 diff --git a/Assets/Scripts/InteractionEngine/CommunicationEvents.cs b/Assets/Scripts/InteractionEngine/CommunicationEvents.cs index 7180a18ac58a138543bc1534378a9b58d2ae173c..77d5fa1134a57a26a30e0e08762f79bf0f357db9 100644 --- a/Assets/Scripts/InteractionEngine/CommunicationEvents.cs +++ b/Assets/Scripts/InteractionEngine/CommunicationEvents.cs @@ -1,5 +1,6 @@ using System.Collections.Generic; using System.Diagnostics; +using System.IO; using UnityEngine; using UnityEngine.Events; @@ -125,6 +126,9 @@ public static string CreatePathToFile(out bool file_exists, string name, string OperationSystem.Windows or _ => use_install_folder ? Application.dataPath : Application.persistentDataPath, }; + string Target_StreamToDataPath_UnityEditor = "UnityEditor"; + if (Application.isEditor && use_install_folder) { path = Path.Combine(Application.persistentDataPath, Target_StreamToDataPath_UnityEditor); } + if (hierarchie != null) { path = CreateHierarchiePath(hierarchie, path); diff --git a/Assets/Scripts/Loading/StreamingAssetLoader.cs b/Assets/Scripts/Loading/StreamingAssetLoader.cs index 06c1981b4bb1d48ca16b4cd5515bc1483e3ce2fb..f5f0f6320bcb45a9cc6e5dc4ab2d09ce678ec283 100644 --- a/Assets/Scripts/Loading/StreamingAssetLoader.cs +++ b/Assets/Scripts/Loading/StreamingAssetLoader.cs @@ -16,6 +16,7 @@ public static class StreamingAssetLoader public static string StreamToPersistentDataPath_Folder_Cookie = "cookie_persistentDataPath.txt"; public static string StreamToDataPath_withHandler_Folder = "StreamToDataPath_withHandler"; public static string PersDataPathToPlayerSaveGame_Path = "stages/SaveGames"; + public static string Target_StreamToDataPath_UnityEditor = "UnityEditor"; //Config @@ -72,6 +73,7 @@ public static bool ReloadManualy_StreamToDataPathWithHandler(string TargetDir_1) //Debug.Log("Reloaded_DPwH"); return true; } + //--------------------------------------------------------------------------------------- @@ -229,7 +231,11 @@ public static void RereadFiles_DataPath() { //Debug.Log("Reread_DataPath"); string rootPath = Path.Combine(Application.streamingAssetsPath, StreamToDataPath_Folder); - string targetFolder = Application.dataPath; + string targetFolder = Application.dataPath; + if (Application.isEditor) + { + targetFolder = Path.Combine(Application.persistentDataPath, Target_StreamToDataPath_UnityEditor); + } RereadFiles_DataPath_withHandler(); if (!ReReadFiles(rootPath, targetFolder)) @@ -250,6 +256,10 @@ public static void RereadFiles_DataPath_withHandler() targetFolder_wh = Application.persistentDataPath; //Debug.Log(OperationSystem.Android + " " + targetFolder_wh); } + if (Application.isEditor) + { + targetFolder_wh = Path.Combine(Application.persistentDataPath, Target_StreamToDataPath_UnityEditor); + } if (!ReReadFiles(rootPath, targetFolder_wh)) {