diff --git a/Assets/EvaluluScript_SendTracesFromHMSceneStart.cs b/Assets/EvaluluScript_SendTracesFromHMSceneStart.cs index 2bb9509abf53da7d40ac1da3e322446ae2ac160d..9e84dd610cecf32a2953291e4289363e99ab5a7d 100644 --- a/Assets/EvaluluScript_SendTracesFromHMSceneStart.cs +++ b/Assets/EvaluluScript_SendTracesFromHMSceneStart.cs @@ -11,344 +11,6 @@ public class EvaluluScript_SendTracesFromHMSceneStart : MonoBehaviour // Start is called before the first frame update public void CallbackSynchroEnd(List<string> allAccount, List<string> successSynchroAccount, List<string> errorSynchroAccount) { - sendTraces(true,successSynchroAccount,false); + uploadStaticMechanism.sendTraces(true,successSynchroAccount,false); } - - private bool currentlySending = false; - private int nbOfFilesToUpload = 0; - private int nbOfFilesUploaded = 0; - private List<path_andteacherid_and_userid> savedFilesWaitingToBeUploaded; - private string pathDirectory; - private string pathDirectoryArchive; - private string PathDirectoryTemporary; - private string pathDirectoryArchiveAncien; - private string currentlySentFilePath = ""; - private string currentlySentTemporaryFilePath = ""; - private bool terminateSceneAFterTransfert = false; - public mainManager mM; - - - public class path_andteacherid_and_userid - { - public string path; - public string teachercode; - public string usercode; - public string usericonID; - } - - [System.Serializable] - public class NewSystemeDeTracesJSONRoot - { - public string deviceUniqueID; - public string fluenceId; - public string teacherCode; - public string loginCode; - public string userID; - public string userIconID; - } - - public void sendTraces(bool fromhmscenestart = false, List<string> successSynchroAccount=null, bool terminateSceneAFterTrasfert1 = false) - { - //Debug.LogError("sendTraces thisTeacherCode="+ thisTeacherCode+ " loginCode = "+ loginCode); - pathDirectory = Application.persistentDataPath + "/newSystemeTraces/"; - pathDirectoryArchive = Application.persistentDataPath + "/newSystemeTraces/ArchiveReal"; - pathDirectoryArchiveAncien = Application.persistentDataPath + "/newSystemeTraces/Archive"; - PathDirectoryTemporary = Application.persistentDataPath + "/newSystemeTraces/Temporary"; - - terminateSceneAFterTransfert = terminateSceneAFterTrasfert1; - - if (!currentlySending) - { - currentlySending = true; - nbOfFilesToUpload = 0; - nbOfFilesUploaded = 0; - savedFilesWaitingToBeUploaded = new List<path_andteacherid_and_userid>(); - savedFilesWaitingToBeUploaded.Clear(); - string[] savedFilesWaitingToBeUploaded_temp1 = Directory.GetFiles(pathDirectory, "*.json"); // attention, ici on prend TOUT les fichiers sans distinction alors qu'il faudrait à minima check le enseignant ID - string[] savedFilesWaitingToBeUploaded_inOldArciveFolder_temp = Directory.GetFiles(pathDirectoryArchiveAncien, "*.json"); // attention, ici on prend TOUT les fichiers sans distinction alors qu'il faudrait à minima check le enseignant ID - string[] savedFilesWaitingToBeUploaded_temp = savedFilesWaitingToBeUploaded_temp1.Concat(savedFilesWaitingToBeUploaded_inOldArciveFolder_temp).ToArray(); - - if(fromhmscenestart) - { - foreach (string teacheraccount in successSynchroAccount) - { - Debug.LogError("account in successSynchroAccount = " + teacheraccount); - List<HM_ChildUser> childUsers = HM_PluginController.GetAllActiveChildsOfTeacher(teacheraccount); - if (childUsers != null) - { - foreach (HM_ChildUser child in childUsers) - { - Debug.Log("userIconID="+child.userIconID+ " loginCode="+ child.loginCode+ " userID="+ child.userID); - //si besoin ça c'est l'UUID qui est aussi renvoyé par la fonction "GetMainUserID" (au où tu l'utilisais pour identifier les élèves, permettra du coup de faire le lien) - foreach (string filePath in savedFilesWaitingToBeUploaded_temp) - { - // Lire le contenu du fichier JSON - string jsonContent = System.IO.File.ReadAllText(filePath); - - // Désérialiser le JSON en une instance de la classe - NewSystemeDeTracesJSONRoot data = JsonUtility.FromJson<NewSystemeDeTracesJSONRoot>(jsonContent); - - // Accéder aux propriétés nécessaires - string teacherCode = data.teacherCode; - string usericonID = data.userIconID; - string logincodeuser = data.loginCode; - // Faire quelque chose avec les valeurs, par exemple, les imprimer dans la console - - if (teacherCode == teacheraccount && logincodeuser == child.loginCode) - { - path_andteacherid_and_userid aaa = new path_andteacherid_and_userid(); - aaa.path = filePath; - aaa.teachercode = teacherCode; - aaa.usericonID = child.userIconID.ToString(); - aaa.usercode = logincodeuser; - Debug.LogError("bingo"); - Debug.Log($"Fichier : {filePath}, teacherCode : {teacherCode}, userIconID : {usericonID}"); - savedFilesWaitingToBeUploaded.Add(aaa); - } - } - } - } - } - } - else - { - //Debug.Log("userIconID="+child.userIconID+ " loginCode="+ child.loginCode+ " userID="+ child.userID); - //si besoin ça c'est l'UUID qui est aussi renvoyé par la fonction "GetMainUserID" (au où tu l'utilisais pour identifier les élèves, permettra du coup de faire le lien) - foreach (string filePath in savedFilesWaitingToBeUploaded_temp) - { - // Lire le contenu du fichier JSON - string jsonContent = System.IO.File.ReadAllText(filePath); - - // Désérialiser le JSON en une instance de la classe - NewSystemeDeTracesJSONRoot data = JsonUtility.FromJson<NewSystemeDeTracesJSONRoot>(jsonContent); - - // Accéder aux propriétés nécessaires - string teacherCode = data.teacherCode; - string usericonID = data.userIconID; - string logincodeuser = data.loginCode; - // Faire quelque chose avec les valeurs, par exemple, les imprimer dans la console - - if (HM_DataController.currentTeacherAccount !=null && teacherCode == HM_DataController.currentTeacherAccount.teacherCode && logincodeuser == HM_DataController.currentChildUser.loginCode) - { - path_andteacherid_and_userid aaa = new path_andteacherid_and_userid(); - aaa.path = filePath; - aaa.teachercode = teacherCode; - aaa.usericonID = HM_DataController.currentChildUser.userIconID.ToString(); - aaa.usercode = logincodeuser; - Debug.LogError("bingo"); - Debug.Log($"Fichier : {filePath}, teacherCode : {teacherCode}, userIconID : {usericonID}"); - savedFilesWaitingToBeUploaded.Add(aaa); - } - } - } - Debug.Log("au final on a à uploader " + savedFilesWaitingToBeUploaded.Count + " fichiers"); - - - if (!Directory.Exists(pathDirectoryArchive)) - { - Directory.CreateDirectory(pathDirectoryArchive); - } - if (!Directory.Exists(PathDirectoryTemporary)) - { - Directory.CreateDirectory(PathDirectoryTemporary); - } - else - { - deleteTemporaryFiles(); - } - nbOfFilesToUpload = savedFilesWaitingToBeUploaded.Count; - - if (nbOfFilesToUpload > 0) - { - uploadOnefichierTraceToHM(); - } - else - { - endAllUploads(); - } - - - } - currentlySending = false; - } - - private void deleteTemporaryFiles() - { - // Obtenez la liste de tous les fichiers dans le dossier spécifié. - string[] files = Directory.GetFiles(PathDirectoryTemporary); - - foreach (string filePath in files) - { - if (Path.GetExtension(filePath) == ".json") - { - try - { - // Supprimez le fichier s'il a l'extension .json. - File.Delete(filePath); - ////Debug.Log("Fichier supprimé : " + filePath); - } - catch (Exception e) - { - ////Debug.LogError("Erreur lors de la suppression du fichier : " + e.Message); - } - } - } - } - - private void uploadOnefichierTraceToHM() - { - if (nbOfFilesUploaded > savedFilesWaitingToBeUploaded.Count - 1) - { - endAllUploads(); - } - else - { - currentlySentFilePath = savedFilesWaitingToBeUploaded[nbOfFilesUploaded].path; - // Le fichier JSON existe, donc nous le lisons - string dateEnvoi = DateTime.Now.ToString("dd-MM-yyyy-HH-mm-ss"); - - string nouveauNomAvecDate = Path.GetFileNameWithoutExtension(currentlySentFilePath) + "-" + dateEnvoi + ".json"; - Debug.Log("on etudie " + currentlySentFilePath); - if (currentlySentFilePath.Contains("Archive")) - { - Debug.LogError("on traite une archive là"); - nouveauNomAvecDate = Path.GetFileNameWithoutExtension(currentlySentFilePath) + ".json"; - } - - currentlySentTemporaryFilePath = Path.Combine(PathDirectoryTemporary, nouveauNomAvecDate); - Debug.Log("nouveauNomAvecDate = " + nouveauNomAvecDate + " currentlySentTemporaryFilePath=" + currentlySentTemporaryFilePath); - // Copiez le fichier source vers le dossier de destination en le renommant si nécessaire. - File.Copy(currentlySentFilePath, currentlySentTemporaryFilePath, true); - if (File.Exists(currentlySentTemporaryFilePath)) - { - try - { - string teachercode = savedFilesWaitingToBeUploaded[nbOfFilesUploaded].teachercode; - string userIconID = savedFilesWaitingToBeUploaded[nbOfFilesUploaded].usericonID; - string userloginCode = savedFilesWaitingToBeUploaded[nbOfFilesUploaded].usercode; - HM_PluginController.UploadTrace(currentlySentTemporaryFilePath, uploadOneFileAsynchroneFinished, teachercode, userIconID, userloginCode); - } - catch (Exception ex) - { - // Gérez toute exception survenue lors de l'appel à CheckTraceExist ici. - Debug.LogError("Erreur lors de l'appel à UploadTrace : " + ex.Message); - deletecurrentFileFromTemporaryFolder(false); - endAllUploads(); - } - } - else - { - Debug.LogError("Traces 2 - ne devrait jamais arriver"); - deletecurrentFileFromTemporaryFolder(false); - endAllUploads(); - /* sauf si : - * Fichier source inexistant : Si le fichier source spécifié n'existe pas, la copie échouera. - Permissions insuffisantes : Si l'application n'a pas les permissions nécessaires pour lire le fichier source ou écrire dans le répertoire de destination, la copie échouera. - Espace disque insuffisant : Si le disque de destination est plein ou manque d'espace, la copie échouera. - Fichier de destination verrouillé : Si le fichier de destination est déjà ouvert ou verrouillé par une autre application, la copie échouera. - Problèmes matériels : Des problèmes matériels, tels que des secteurs défectueux sur le disque, peuvent entraîner des erreurs lors de la copie - */ - } - } - - } - - private void deletecurrentFileFromTemporaryFolder(bool SuccesSomoveitToTheArchiveFolder) - { - if (SuccesSomoveitToTheArchiveFolder) - { - // Obtenez le nom du fichier sans le chemin - string fileName = Path.GetFileName(currentlySentTemporaryFilePath); - // Créez le chemin complet du fichier de destination dans le nouveau dossier - string destinationARCHIVEFilePath = Path.Combine(pathDirectoryArchive, fileName); - // Déplacez le fichier source vers le dossier de destination - ////Debug.Log("fichierTemporary moved in archive" + fichierTemporary); - if (File.Exists(currentlySentTemporaryFilePath)) - { - if (!File.Exists(destinationARCHIVEFilePath)) - { - File.Move(currentlySentTemporaryFilePath, destinationARCHIVEFilePath); - } - else - { - File.Delete(currentlySentTemporaryFilePath); - } - } - ////Debug.Log("ToDeleteOriginalFilePath = " + fichierOriginal); - // et on supprime le fichier original vu qu'il a été mis dans l'archive - if (File.Exists(currentlySentFilePath)) - { - File.Delete(currentlySentFilePath); - ////Debug.Log("fichier original deleted " + fichierOriginal); - } - else - { - ////Debug.Log("le fichier original n'existe pas "); - } - } - else - { - // on supprime le fichier de temporary - if (File.Exists(currentlySentTemporaryFilePath)) - { - File.Delete(currentlySentTemporaryFilePath); - ////Debug.Log("fichier original deleted " + fichierOriginal); - } - } - } - - - private void uploadOneFileAsynchroneFinished(int resultCode, string resultMessage) - { - Debug.LogError("resultCode=" + resultCode + " resultMessage=" + resultMessage + " nombreDeFichiersTraites=" + nbOfFilesUploaded + " nombreDeFichiersATransferer=" + nbOfFilesToUpload); - ////Debug.Log("transfertAsynchroneFinished resultCode = " + resultCode.ToString() + " resultMessage=" + resultMessage + " nombreDeFichiersTraites = " + nombreDeFichiersTraites); - - if (resultCode == 1 || resultCode == 0) - { - deletecurrentFileFromTemporaryFolder(true); - if (nbOfFilesUploaded == nbOfFilesToUpload - 1) - { - - nbOfFilesToUpload = 0; - nbOfFilesUploaded = 0; - currentlySending = false; - endAllUploads(); - - } - else - { - // le transfeet précédent c'est bien passé (retour == 0) on lance le fichier suivant - nbOfFilesUploaded++; - uploadOnefichierTraceToHM(); - } - - - // Bien passé - } - else - { - Debug.LogError("erreur lors de l'envoi on stop tout"); - deletecurrentFileFromTemporaryFolder(false); - endAllUploads(); - } - } - - - private void endAllUploads() - { - Debug.LogError("endTransferts"); - nbOfFilesUploaded = 0; - nbOfFilesToUpload = 0; - currentlySending = false; - if (terminateSceneAFterTransfert && mM !=null) - { - // StartCoroutine(mM.fenetrePause.terminateScenefterDeconnexionAndTracesSent()); - StartCoroutine(mM.terminateScene()); - } - else - { - - } - } - } diff --git a/Assets/NewSystemeDeTraces.cs b/Assets/NewSystemeDeTraces.cs index ad682fdb74d72203b62e0f311078c4fe4a011706..1f35d49f8314320afe69689fe488c1245b3aff42 100644 --- a/Assets/NewSystemeDeTraces.cs +++ b/Assets/NewSystemeDeTraces.cs @@ -119,16 +119,7 @@ public class NewSystemeDeTraces : MonoBehaviour public void sendThisUserTracesToHMPlugin(bool terminateSceneAFterTrasfert1 = false) { //Debug.LogError("sendThisUserTracesToHMPlugin launched envoieEnCours="+ envoieEnCours+ " terminateSceneAFterTransfert="+ terminateSceneAFterTransfert); - if (prefabUpdateTraces != null) - { - prefabUpdateTraces.mM = mM; - prefabUpdateTraces.sendTraces(false, null, terminateSceneAFterTrasfert1); - - } - else - { - Debug.LogError("alert module envoi des traces manquant"); - } + uploadStaticMechanism.sendTraces(false, null, terminateSceneAFterTrasfert1,mM); } private string GetJsonFilePath(bool poidsDepassedAfterSave = false) diff --git a/Assets/Scenes/MainScene.unity b/Assets/Scenes/MainScene.unity index 1d814d949d02bc233d55ac959b84885d5f9b0a58..08470122f2dfde789821af8aadeb1da8c5aaa14d 100644 --- a/Assets/Scenes/MainScene.unity +++ b/Assets/Scenes/MainScene.unity @@ -4908,6 +4908,10 @@ PrefabInstance: serializedVersion: 3 m_TransformParent: {fileID: 0} m_Modifications: + - target: {fileID: 279471507686351197, guid: 06a9d1a944c66694db163b78f9e08fb5, type: 3} + propertyPath: mM + value: + objectReference: {fileID: 761270576} - target: {fileID: 3444795586396849137, guid: 06a9d1a944c66694db163b78f9e08fb5, type: 3} propertyPath: m_Name value: uploadTracesEvalulu_adeposerdansHM_sceneStart diff --git a/Assets/Scenes/SplashScreen.unity b/Assets/Scenes/SplashScreen.unity index c9e1ab773e011111312557ff7a580793ad7143c8..8a82d50fa8e60fd283429d827eed59a171d7f3e3 100644 --- a/Assets/Scenes/SplashScreen.unity +++ b/Assets/Scenes/SplashScreen.unity @@ -308,6 +308,7 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: f32ba5333f5ed594993ec1bf35724497, type: 3} m_Name: m_EditorClassIdentifier: + versionEvaluluTexte: {fileID: 2091683022} timeToElapseBeforeNextScene: 2 version_text: --- !u!1 &1299876371 @@ -569,7 +570,7 @@ GameObject: m_Icon: {fileID: 0} m_NavMeshLayer: 0 m_StaticEditorFlags: 0 - m_IsActive: 1 + m_IsActive: 0 --- !u!224 &2091683021 RectTransform: m_ObjectHideFlags: 0 @@ -586,8 +587,8 @@ RectTransform: m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_AnchorMin: {x: 0.3, y: 0.25} m_AnchorMax: {x: 0.7, y: 0.3} - m_AnchoredPosition: {x: -365.9, y: 658} - m_SizeDelta: {x: -81.79999, y: 0} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: 0, y: 0} m_Pivot: {x: 0.5, y: 0.5} --- !u!114 &2091683022 MonoBehaviour: @@ -609,7 +610,7 @@ MonoBehaviour: m_OnCullStateChanged: m_PersistentCalls: m_Calls: [] - m_text: v1.10 + m_text: V1.13 m_isRightToLeft: 0 m_fontAsset: {fileID: 11400000, guid: 8f586378b4e144a9851e7b34d9b748ee, type: 2} m_sharedMaterial: {fileID: 2180264, guid: 8f586378b4e144a9851e7b34d9b748ee, type: 2} diff --git a/Assets/SplashScreenScript.cs b/Assets/SplashScreenScript.cs index fa6d0911db7843825dc00032e5892201a69d3889..4e3e50e7448430be6b57026ed850206de74c48df 100644 --- a/Assets/SplashScreenScript.cs +++ b/Assets/SplashScreenScript.cs @@ -1,3 +1,4 @@ +using TMPro; using UnityEditor; using UnityEngine; using UnityEngine.SceneManagement; @@ -5,8 +6,10 @@ using UnityEngine.SceneManagement; public class SplashScreenScript : MonoBehaviour { // Start is called before the first frame update + public TextMeshProUGUI versionEvaluluTexte; void Start() { + //versionEvaluluTexte.text = Application.version; timeElapsed = 0.0f; timeToElapseBeforeNextScene = 0.5f; Debug.LogError("splashscren"); diff --git a/Assets/TRANS3_PluginHM/Scenes/HM_SceneStart.unity b/Assets/TRANS3_PluginHM/Scenes/HM_SceneStart.unity index e876499f85d59013a3d26282749995931705dd8f..be44cb2d5042406a925d50068e560ceae9713910 100644 --- a/Assets/TRANS3_PluginHM/Scenes/HM_SceneStart.unity +++ b/Assets/TRANS3_PluginHM/Scenes/HM_SceneStart.unity @@ -36228,7 +36228,7 @@ RectTransform: m_ConstrainProportionsScale: 0 m_Children: - {fileID: 2880375242900932910} - - {fileID: 1706337277} + - {fileID: 1836073459} m_Father: {fileID: 0} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_AnchorMin: {x: 0, y: 0} @@ -44263,119 +44263,6 @@ CanvasRenderer: m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1696368029} m_CullTransparentMesh: 1 ---- !u!1001 &1706337276 -PrefabInstance: - m_ObjectHideFlags: 0 - serializedVersion: 2 - m_Modification: - serializedVersion: 3 - m_TransformParent: {fileID: 1399988443} - m_Modifications: - - target: {fileID: 3444795586396849137, guid: 06a9d1a944c66694db163b78f9e08fb5, type: 3} - propertyPath: m_Name - value: uploadTracesEvalulu_adeposerdansHM_sceneStart - objectReference: {fileID: 0} - - target: {fileID: 3797655205488179624, guid: 06a9d1a944c66694db163b78f9e08fb5, type: 3} - propertyPath: m_Pivot.x - value: 0.5 - objectReference: {fileID: 0} - - target: {fileID: 3797655205488179624, guid: 06a9d1a944c66694db163b78f9e08fb5, type: 3} - propertyPath: m_Pivot.y - value: 0.5 - objectReference: {fileID: 0} - - target: {fileID: 3797655205488179624, guid: 06a9d1a944c66694db163b78f9e08fb5, type: 3} - propertyPath: m_AnchorMax.x - value: 0.5 - objectReference: {fileID: 0} - - target: {fileID: 3797655205488179624, guid: 06a9d1a944c66694db163b78f9e08fb5, type: 3} - propertyPath: m_AnchorMax.y - value: 0.5 - objectReference: {fileID: 0} - - target: {fileID: 3797655205488179624, guid: 06a9d1a944c66694db163b78f9e08fb5, type: 3} - propertyPath: m_AnchorMin.x - value: 0.5 - objectReference: {fileID: 0} - - target: {fileID: 3797655205488179624, guid: 06a9d1a944c66694db163b78f9e08fb5, type: 3} - propertyPath: m_AnchorMin.y - value: 0.5 - objectReference: {fileID: 0} - - target: {fileID: 3797655205488179624, guid: 06a9d1a944c66694db163b78f9e08fb5, type: 3} - propertyPath: m_SizeDelta.x - value: 100 - objectReference: {fileID: 0} - - target: {fileID: 3797655205488179624, guid: 06a9d1a944c66694db163b78f9e08fb5, type: 3} - propertyPath: m_SizeDelta.y - value: 100 - objectReference: {fileID: 0} - - target: {fileID: 3797655205488179624, guid: 06a9d1a944c66694db163b78f9e08fb5, type: 3} - propertyPath: m_LocalPosition.x - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 3797655205488179624, guid: 06a9d1a944c66694db163b78f9e08fb5, type: 3} - propertyPath: m_LocalPosition.y - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 3797655205488179624, guid: 06a9d1a944c66694db163b78f9e08fb5, type: 3} - propertyPath: m_LocalPosition.z - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 3797655205488179624, guid: 06a9d1a944c66694db163b78f9e08fb5, type: 3} - propertyPath: m_LocalRotation.w - value: 1 - objectReference: {fileID: 0} - - target: {fileID: 3797655205488179624, guid: 06a9d1a944c66694db163b78f9e08fb5, type: 3} - propertyPath: m_LocalRotation.x - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 3797655205488179624, guid: 06a9d1a944c66694db163b78f9e08fb5, type: 3} - propertyPath: m_LocalRotation.y - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 3797655205488179624, guid: 06a9d1a944c66694db163b78f9e08fb5, type: 3} - propertyPath: m_LocalRotation.z - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 3797655205488179624, guid: 06a9d1a944c66694db163b78f9e08fb5, type: 3} - propertyPath: m_AnchoredPosition.x - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 3797655205488179624, guid: 06a9d1a944c66694db163b78f9e08fb5, type: 3} - propertyPath: m_AnchoredPosition.y - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 3797655205488179624, guid: 06a9d1a944c66694db163b78f9e08fb5, type: 3} - propertyPath: m_LocalEulerAnglesHint.x - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 3797655205488179624, guid: 06a9d1a944c66694db163b78f9e08fb5, type: 3} - propertyPath: m_LocalEulerAnglesHint.y - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 3797655205488179624, guid: 06a9d1a944c66694db163b78f9e08fb5, type: 3} - propertyPath: m_LocalEulerAnglesHint.z - value: 0 - objectReference: {fileID: 0} - m_RemovedComponents: [] - m_RemovedGameObjects: [] - m_AddedGameObjects: [] - m_AddedComponents: [] - m_SourcePrefab: {fileID: 100100000, guid: 06a9d1a944c66694db163b78f9e08fb5, type: 3} ---- !u!224 &1706337277 stripped -RectTransform: - m_CorrespondingSourceObject: {fileID: 3797655205488179624, guid: 06a9d1a944c66694db163b78f9e08fb5, type: 3} - m_PrefabInstance: {fileID: 1706337276} - m_PrefabAsset: {fileID: 0} ---- !u!114 &1706337278 stripped -MonoBehaviour: - m_CorrespondingSourceObject: {fileID: 279471507686351197, guid: 06a9d1a944c66694db163b78f9e08fb5, type: 3} - m_PrefabInstance: {fileID: 1706337276} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 0} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: b3fe735a286924845b27fd76072b5089, type: 3} - m_Name: - m_EditorClassIdentifier: --- !u!1 &1714360956 GameObject: m_ObjectHideFlags: 0 @@ -47129,6 +47016,119 @@ CanvasRenderer: m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1835012498} m_CullTransparentMesh: 1 +--- !u!1001 &1836073458 +PrefabInstance: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + serializedVersion: 3 + m_TransformParent: {fileID: 1399988443} + m_Modifications: + - target: {fileID: 3444795586396849137, guid: 06a9d1a944c66694db163b78f9e08fb5, type: 3} + propertyPath: m_Name + value: uploadTracesEvalulu_adeposerdansHM_sceneStart + objectReference: {fileID: 0} + - target: {fileID: 3797655205488179624, guid: 06a9d1a944c66694db163b78f9e08fb5, type: 3} + propertyPath: m_Pivot.x + value: 0.5 + objectReference: {fileID: 0} + - target: {fileID: 3797655205488179624, guid: 06a9d1a944c66694db163b78f9e08fb5, type: 3} + propertyPath: m_Pivot.y + value: 0.5 + objectReference: {fileID: 0} + - target: {fileID: 3797655205488179624, guid: 06a9d1a944c66694db163b78f9e08fb5, type: 3} + propertyPath: m_AnchorMax.x + value: 0.5 + objectReference: {fileID: 0} + - target: {fileID: 3797655205488179624, guid: 06a9d1a944c66694db163b78f9e08fb5, type: 3} + propertyPath: m_AnchorMax.y + value: 0.5 + objectReference: {fileID: 0} + - target: {fileID: 3797655205488179624, guid: 06a9d1a944c66694db163b78f9e08fb5, type: 3} + propertyPath: m_AnchorMin.x + value: 0.5 + objectReference: {fileID: 0} + - target: {fileID: 3797655205488179624, guid: 06a9d1a944c66694db163b78f9e08fb5, type: 3} + propertyPath: m_AnchorMin.y + value: 0.5 + objectReference: {fileID: 0} + - target: {fileID: 3797655205488179624, guid: 06a9d1a944c66694db163b78f9e08fb5, type: 3} + propertyPath: m_SizeDelta.x + value: 100 + objectReference: {fileID: 0} + - target: {fileID: 3797655205488179624, guid: 06a9d1a944c66694db163b78f9e08fb5, type: 3} + propertyPath: m_SizeDelta.y + value: 100 + objectReference: {fileID: 0} + - target: {fileID: 3797655205488179624, guid: 06a9d1a944c66694db163b78f9e08fb5, type: 3} + propertyPath: m_LocalPosition.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 3797655205488179624, guid: 06a9d1a944c66694db163b78f9e08fb5, type: 3} + propertyPath: m_LocalPosition.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 3797655205488179624, guid: 06a9d1a944c66694db163b78f9e08fb5, type: 3} + propertyPath: m_LocalPosition.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 3797655205488179624, guid: 06a9d1a944c66694db163b78f9e08fb5, type: 3} + propertyPath: m_LocalRotation.w + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 3797655205488179624, guid: 06a9d1a944c66694db163b78f9e08fb5, type: 3} + propertyPath: m_LocalRotation.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 3797655205488179624, guid: 06a9d1a944c66694db163b78f9e08fb5, type: 3} + propertyPath: m_LocalRotation.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 3797655205488179624, guid: 06a9d1a944c66694db163b78f9e08fb5, type: 3} + propertyPath: m_LocalRotation.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 3797655205488179624, guid: 06a9d1a944c66694db163b78f9e08fb5, type: 3} + propertyPath: m_AnchoredPosition.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 3797655205488179624, guid: 06a9d1a944c66694db163b78f9e08fb5, type: 3} + propertyPath: m_AnchoredPosition.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 3797655205488179624, guid: 06a9d1a944c66694db163b78f9e08fb5, type: 3} + propertyPath: m_LocalEulerAnglesHint.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 3797655205488179624, guid: 06a9d1a944c66694db163b78f9e08fb5, type: 3} + propertyPath: m_LocalEulerAnglesHint.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 3797655205488179624, guid: 06a9d1a944c66694db163b78f9e08fb5, type: 3} + propertyPath: m_LocalEulerAnglesHint.z + value: 0 + objectReference: {fileID: 0} + m_RemovedComponents: [] + m_RemovedGameObjects: [] + m_AddedGameObjects: [] + m_AddedComponents: [] + m_SourcePrefab: {fileID: 100100000, guid: 06a9d1a944c66694db163b78f9e08fb5, type: 3} +--- !u!224 &1836073459 stripped +RectTransform: + m_CorrespondingSourceObject: {fileID: 3797655205488179624, guid: 06a9d1a944c66694db163b78f9e08fb5, type: 3} + m_PrefabInstance: {fileID: 1836073458} + m_PrefabAsset: {fileID: 0} +--- !u!114 &1836073460 stripped +MonoBehaviour: + m_CorrespondingSourceObject: {fileID: 279471507686351197, guid: 06a9d1a944c66694db163b78f9e08fb5, type: 3} + m_PrefabInstance: {fileID: 1836073458} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: b3fe735a286924845b27fd76072b5089, type: 3} + m_Name: + m_EditorClassIdentifier: --- !u!1 &1842381095 GameObject: m_ObjectHideFlags: 0 @@ -63212,7 +63212,7 @@ MonoBehaviour: onSynchroEnd: m_PersistentCalls: m_Calls: - - m_Target: {fileID: 1706337278} + - m_Target: {fileID: 1836073460} m_TargetAssemblyTypeName: EvaluluScript_SendTracesFromHMSceneStart, Assembly-CSharp m_MethodName: CallbackSynchroEnd m_Mode: 0 diff --git a/Assets/TRANS3_PluginHM/Scripts/Controllers/Contents/HM_ContentSynchroAWS.cs b/Assets/TRANS3_PluginHM/Scripts/Controllers/Contents/HM_ContentSynchroAWS.cs index d10171bd9a293b0c59e7842b4d3a0291cb7952c3..de0e24aa6bf5f1ff5ea7cb9e98f25e7467a9c8bf 100644 --- a/Assets/TRANS3_PluginHM/Scripts/Controllers/Contents/HM_ContentSynchroAWS.cs +++ b/Assets/TRANS3_PluginHM/Scripts/Controllers/Contents/HM_ContentSynchroAWS.cs @@ -43,6 +43,9 @@ public class HM_ContentSynchroAWS : HM_Content private List<string> deactivateToken = new List<string>(); + [HideInInspector] + public static float timeCheckUpload = -1; + [HideInInspector] public int navID = 0; @@ -270,20 +273,24 @@ public class HM_ContentSynchroAWS : HM_Content { if (errorMaxValue == 2) { - OnErrorMessage("Un conflit a été détécté entre deux comptes utilisant le même lot d'identifiants.\n Code erreur : 2"); + StartCoroutine(CheckTimeUploadTrace(false, "Un conflit a été détécté entre deux comptes utilisant le même lot d'identifiants.\n Code erreur : 2")); + //OnErrorMessage("Un conflit a été détécté entre deux comptes utilisant le même lot d'identifiants.\n Code erreur : 2"); } else if (errorMaxValue == 422) { - OnErrorMessage("L'application nécessite d'être mis à jour pour se synchroniser.\n Code erreur : " + errorMaxValue); + StartCoroutine(CheckTimeUploadTrace(false, "L'application nécessite d'être mis à jour pour se synchroniser.\n Code erreur : " + errorMaxValue)); + //OnErrorMessage("L'application nécessite d'être mis à jour pour se synchroniser.\n Code erreur : " + errorMaxValue); } else { - OnErrorMessage("Un ou plusieurs comptes n'ont pas pu se synchroniser.\n Code erreur : "+ errorMaxValue); + StartCoroutine(CheckTimeUploadTrace(false, "Un ou plusieurs comptes n'ont pas pu se synchroniser.\n Code erreur : " + errorMaxValue)); + //OnErrorMessage("Un ou plusieurs comptes n'ont pas pu se synchroniser.\n Code erreur : "+ errorMaxValue); } } else { - OnSuccessMessage(); + StartCoroutine(CheckTimeUploadTrace(true,"")); + //OnSuccessMessage(); } } } @@ -314,15 +321,18 @@ public class HM_ContentSynchroAWS : HM_Content { if (errorMaxValue == 2) { - OnErrorMessage("Un conflit a été détécté entre deux comptes utilisant le même lot d'identifiants.\n Code erreur : 2"); + StartCoroutine(CheckTimeUploadTrace(false, "Un conflit a été détécté entre deux comptes utilisant le même lot d'identifiants.\n Code erreur : 2")); + //OnErrorMessage("Un conflit a été détécté entre deux comptes utilisant le même lot d'identifiants.\n Code erreur : 2"); } else if (errorMaxValue == 422) { - OnErrorMessage("L'application nécessite d'être mis à jour pour se synchroniser.\n Code erreur : " + errorMaxValue); + StartCoroutine(CheckTimeUploadTrace(false, "L'application nécessite d'être mis à jour pour se synchroniser.\n Code erreur : " + errorMaxValue)); + //OnErrorMessage("L'application nécessite d'être mis à jour pour se synchroniser.\n Code erreur : " + errorMaxValue); } else { - OnErrorMessage("Un ou plusieurs comptes n'ont pas pu se synchroniser.\n Code erreur : " + errorMaxValue); + StartCoroutine(CheckTimeUploadTrace(false, "Un ou plusieurs comptes n'ont pas pu se synchroniser.\n Code erreur : " + errorMaxValue)); + //OnErrorMessage("Un ou plusieurs comptes n'ont pas pu se synchroniser.\n Code erreur : "+ errorMaxValue); } } } @@ -419,4 +429,27 @@ public class HM_ContentSynchroAWS : HM_Content this.CloseContent(HM_Scripts.contentProfil); } } + + public IEnumerator CheckTimeUploadTrace(bool success, string errorMsg) + { + timeCheckUpload = Time.realtimeSinceStartup; + + while (Time.realtimeSinceStartup - timeCheckUpload < 1.0f) + { + yield return new WaitForSeconds(0.1f); + } + + timeCheckUpload = -1; + + if (success) + { + UnityMainThreadDispatcher.Instance().Enqueue(OnSuccessMessage); + } + else + { + UnityMainThreadDispatcher.Instance().Enqueue(() => OnErrorMessage(errorMsg)); + } + + yield return null; + } } diff --git a/Assets/TRANS3_PluginHM/Scripts/Controllers/HM_PluginController.cs b/Assets/TRANS3_PluginHM/Scripts/Controllers/HM_PluginController.cs index 89ef090dc39e1297a78427024dea346b6c4a8997..cf6593de9eebbe441303357cc11512b2d4a7f4af 100644 --- a/Assets/TRANS3_PluginHM/Scripts/Controllers/HM_PluginController.cs +++ b/Assets/TRANS3_PluginHM/Scripts/Controllers/HM_PluginController.cs @@ -11,6 +11,7 @@ using Shatalmic; using UnityEngine.Android; using Newtonsoft.Json.Linq; using System.Threading.Tasks; +using UnityEngine.SceneManagement; public enum APP_ID { @@ -402,11 +403,11 @@ public class HM_PluginController : MonoBehaviour void Start() { if (HM_NetworkController.currentENV == HM_NetworkController.ENV.DEVELOP) - GameObject.Find("HM_TextVersion").GetComponent<TextMeshProUGUI>().text = "v1.6.6 - DEVELOP"; + GameObject.Find("HM_TextVersion").GetComponent<TextMeshProUGUI>().text = "v1.6.7 - DEVELOP"; else if (HM_NetworkController.currentENV == HM_NetworkController.ENV.PREPROD) - GameObject.Find("HM_TextVersion").GetComponent<TextMeshProUGUI>().text = "v1.6.6 - PREPROD"; + GameObject.Find("HM_TextVersion").GetComponent<TextMeshProUGUI>().text = "v1.6.7 - PREPROD"; else - GameObject.Find("HM_TextVersion").GetComponent<TextMeshProUGUI>().text = "v1.6.6 - PROD"; + GameObject.Find("HM_TextVersion").GetComponent<TextMeshProUGUI>().text = "v1.6.7 - PROD"; HM_Scripts.optionPanel.HideButton(true); @@ -1191,7 +1192,10 @@ public class HM_PluginController : MonoBehaviour public static void CheckTraceExist(string fileURL, System.Action<int,string> callback, string teacherCode = null, int userIconId = -1, string userLoginCode = null) { - HM_Scripts.pluginController.StartPlugin(); + if (!SceneManager.GetActiveScene().name.Equals("HM_SceneStart")) + { + HM_Scripts.pluginController.StartPlugin(); + } HM_ReturnInfo returnInfo = new HM_ReturnInfo(); @@ -1240,6 +1244,8 @@ public class HM_PluginController : MonoBehaviour return; } + HM_ContentSynchroAWS.timeCheckUpload = Time.realtimeSinceStartup; + fileURL = fileURL.Replace('\\', '/'); //construction URL @@ -1285,7 +1291,10 @@ public class HM_PluginController : MonoBehaviour private static IEnumerator OnCheckTraceExistResponse(HM_ReturnInfo returnInfo, System.Action<int, string> callback) { - HM_Scripts.pluginController.StopPlugin(); + if (!SceneManager.GetActiveScene().name.Equals("HM_SceneStart")) + { + HM_Scripts.pluginController.StopPlugin(); + } if (returnInfo.code > 0) { @@ -1307,14 +1316,16 @@ public class HM_PluginController : MonoBehaviour yield return null; } - public static void UploadTrace(string fileURL, System.Action<int, string> callback, string teacherCode = null, string userIconId = null, string userLoginCode = null) + public static void UploadTrace(string fileURL, System.Action<int, string> callback, string teacherCode = null, int userIconId = -1, string userLoginCode = null) { - Debug.Log("UploadTrace teacherCode="+ teacherCode+ " userLoginCode="+ userLoginCode); - HM_Scripts.pluginController.StartPlugin(); + if (!SceneManager.GetActiveScene().name.Equals("HM_SceneStart")) + { + HM_Scripts.pluginController.StartPlugin(); + } HM_ReturnInfo returnInfo = new HM_ReturnInfo(); - if (teacherCode == null && userIconId == null && userLoginCode == null && HM_DataController.currentChildUser == null) + if (teacherCode == null && userIconId == -1 && userLoginCode == null && HM_DataController.currentChildUser == null) { returnInfo.code = -1; returnInfo.message = "Le plugin HM ne retrouve pas l'enfant actuellement connecté"; @@ -1348,6 +1359,8 @@ public class HM_PluginController : MonoBehaviour teacherAccount = HM_DataController.currentTeacherAccount; } + HM_ContentSynchroAWS.timeCheckUpload = Time.realtimeSinceStartup; + if (teacherAccount.dataAWS._idToken == null || teacherAccount.dataAWS._idToken.Length == 0 || teacherAccount.dataAWS.identityId == null @@ -1385,7 +1398,7 @@ public class HM_PluginController : MonoBehaviour string serverPath = "private/" + teacherAccount.dataAWS.identityId + "/traces/" + appName + "/"; - if (userIconId != null && userLoginCode != null) + if (userIconId != -1 && userLoginCode != null) { serverPath += userIconId + "/" + userLoginCode + "/" + filename; } @@ -1404,7 +1417,10 @@ public class HM_PluginController : MonoBehaviour private static IEnumerator OnUploadTraceResponse(HM_ReturnInfo returnInfo, System.Action<int, string> callback) { - HM_Scripts.pluginController.StopPlugin(); + if (!SceneManager.GetActiveScene().name.Equals("HM_SceneStart")) + { + HM_Scripts.pluginController.StopPlugin(); + } if (returnInfo.code == 0) { diff --git a/Assets/TRANS3_PluginHM/Scripts/Controllers/HM_PluginController.cs.bak b/Assets/TRANS3_PluginHM/Scripts/Controllers/HM_PluginController.cs.bak deleted file mode 100644 index 43a82199f727b594088006570cc531e4c6a4717b..0000000000000000000000000000000000000000 --- a/Assets/TRANS3_PluginHM/Scripts/Controllers/HM_PluginController.cs.bak +++ /dev/null @@ -1,1411 +0,0 @@ -using System.Collections; -using System.Collections.Generic; -using UnityEngine; -using TMPro; -using System; -using UnityEngine.Events; -using Newtonsoft.Json; -using System.Text; -using UnityEngine.UI; -using Shatalmic; -using UnityEngine.Android; -using Newtonsoft.Json.Linq; -using System.Threading.Tasks; - -public enum APP_ID -{ - NONE, - LUCIOLE, - ELARGIR, - EVASION, - EVALULU, -} - -public class HM_PluginController : MonoBehaviour -{ - public enum NAV_CONTEXT - { - NONE, - LOT, - LETTRE, - NEW_TEACHER, - SYNCHRO, - } - - - //pour lancer automatiquement le plugin sur l'écran de choix profil (lancement d'une application TRANS3). Laissez à false pour le prefab ! - public bool sceneStart = false; - - public APP_ID appID = APP_ID.NONE;//choix de l'app concernée, à modifier via Inspector - - [HideInInspector] - public static NAV_CONTEXT navContext = NAV_CONTEXT.NONE; - [HideInInspector] - public int navMaxID = 0; - - public string sceneNameAfterLogin = ""; - public UnityEvent callbackSecondChildLogin; - public UnityEvent onAppSettingCancel; - public UnityEvent onAppSettingEnd; - public UnityEvent<List<string>, List<string>, List<string>> onSynchroEnd; - - public List<Sprite> childAvatars = new List<Sprite>(); - - public TextMeshProUGUI appName; - public Image appImage; - public TextMeshProUGUI appVersion; - - public List<Sprite> appsImages = new List<Sprite>(); - - public bool isActive = false; - private int isActiveCpt = 0; - - [HideInInspector] - public Image colorDeviceInfo = null; - -#if UNITY_ANDROID && !UNITY_EDITOR - private AndroidJavaObject androidVersion = null; -#endif - - public void CheckAndroidPermissions(bool force = false) - { - int alreadyAsked = PlayerPrefs.GetInt("HM_BluetoothPermissions", -1); - - var callbacks = new PermissionCallbacks(); - callbacks.PermissionDenied += PermissionCallbacks_PermissionDenied; - callbacks.PermissionGranted += PermissionCallbacks_PermissionGranted; - callbacks.PermissionDeniedAndDontAskAgain += PermissionCallbacks_PermissionDeniedAndDontAskAgain; - - if (force || alreadyAsked <= 0)//demande de permission - { -#if UNITY_ANDROID && !UNITY_EDITOR - int sdkVersion = androidVersion.GetStatic<int>("SDK_INT"); -#else - int sdkVersion = 31; -#endif - - if (sdkVersion >= 31) - { - if (!Permission.HasUserAuthorizedPermission("android.permission.BLUETOOTH_SCAN")) - { - Permission.RequestUserPermission("android.permission.BLUETOOTH_SCAN", callbacks); - } - else - { - if (!Permission.HasUserAuthorizedPermission("android.permission.BLUETOOTH_ADVERTISE")) - { - Permission.RequestUserPermission("android.permission.BLUETOOTH_ADVERTISE", callbacks); - } - else - { - if (!Permission.HasUserAuthorizedPermission("android.permission.BLUETOOTH_CONNECT")) - { - Permission.RequestUserPermission("android.permission.BLUETOOTH_CONNECT", callbacks); - } - else - { - PlayerPrefs.SetInt("HM_BluetoothPermissions", 2); - } - } - } - } - else - { - if (!Permission.HasUserAuthorizedPermission("android.permission.ACCESS_FINE_LOCATION")) - { - Permission.RequestUserPermission("android.permission.ACCESS_FINE_LOCATION", callbacks); - } - else - { - if (!Permission.HasUserAuthorizedPermission("android.permission.BLUETOOTH")) - { - Permission.RequestUserPermission("android.permission.BLUETOOTH", callbacks); - } - else - { - PlayerPrefs.SetInt("HM_BluetoothPermissions", 2); - } - } - } - - } - } - - public bool HasAndroidBluetoothPermissions() - { -#if UNITY_ANDROID && !UNITY_EDITOR - int sdkVersion = androidVersion.GetStatic<int>("SDK_INT"); -#else - int sdkVersion = 31; -#endif - - if (sdkVersion >= 31) - { - if (Permission.HasUserAuthorizedPermission("android.permission.BLUETOOTH_SCAN") - && Permission.HasUserAuthorizedPermission("android.permission.BLUETOOTH_ADVERTISE") - && Permission.HasUserAuthorizedPermission("android.permission.BLUETOOTH_CONNECT")) - { - return true; - } - } - else - { - if (Permission.HasUserAuthorizedPermission("android.permission.ACCESS_FINE_LOCATION") - && Permission.HasUserAuthorizedPermission("android.permission.BLUETOOTH")) - { - return true; - } - } - - return false; - } - - - private void PermissionCallbacks_PermissionDenied(string permissionName) - { - PlayerPrefs.SetInt("HM_BluetoothPermissions", 1); - } - - private void PermissionCallbacks_PermissionGranted(string permissionName) - { - CheckAndroidPermissions(true); - } - - private void PermissionCallbacks_PermissionDeniedAndDontAskAgain(string permissionName) - { - PlayerPrefs.SetInt("HM_BluetoothPermissions", 0); - } - - void Awake() - { - HM_Scripts.Initialize(); - - //HM_Model.Initialize(); - -#if UNITY_ANDROID && !UNITY_EDITOR - androidVersion = new AndroidJavaObject("android.os.Build$VERSION"); - CheckAndroidPermissions(); -#endif - - if (sceneStart) - { - HM_Log.ReplaceTextFile("HM_Log.txt", ""); - HM_Log.ReplaceTextFile("HM_LogResult.txt", ""); - - //Debug.Log("Load"); - HM_Model.Load(); - HM_Scripts.optionPanel.UpdateData(); - HM_Scripts.debugPanel.buttonSwitchPanel.gameObject.SetActive(true); - - } - else - { - HM_Scripts.debugPanel.buttonSwitchPanel.gameObject.SetActive(false); - } - - isActive = false; - isActiveCpt = 0; - - //l'appID est sensé exister dans un contexte normal. Il doit étre renseigner sur chaque instance de HM_PluginController existant dans le projet - //(dans la scéne HM_SceneStart et sur toutes les instances prefabs utilisés dans les scénes de l'application) - if (appID == APP_ID.NONE) - { - Debug.LogWarning("Un script HM_PluginController n'a pas été configuré pour une app en particulier. Merci de renseigner l'app !"); - } - - colorDeviceInfo = GameObject.Find("HM_ColorDeviceInfo").GetComponent<Image>(); - - switch (HM_DataController.model.currentColorID) - { - case 1: - colorDeviceInfo.color = new Color32(246, 115, 172, 255); - colorDeviceInfo.transform.GetChild(0).GetComponent<TextMeshProUGUI>().text = "A"; - break; - case 2: - colorDeviceInfo.color = new Color32(155, 47, 174, 255); - colorDeviceInfo.transform.GetChild(0).GetComponent<TextMeshProUGUI>().text = "B"; - break; - case 3: - colorDeviceInfo.color = new Color32(64, 84, 178, 255); - colorDeviceInfo.transform.GetChild(0).GetComponent<TextMeshProUGUI>().text = "C"; - break; - case 4: - colorDeviceInfo.color = new Color32(29, 170, 241, 255); - colorDeviceInfo.transform.GetChild(0).GetComponent<TextMeshProUGUI>().text = "D"; - break; - case 5: - colorDeviceInfo.color = new Color32(31, 188, 210, 255); - colorDeviceInfo.transform.GetChild(0).GetComponent<TextMeshProUGUI>().text = "E"; - break; - case 6: - colorDeviceInfo.color = new Color32(80, 174, 85, 255); - colorDeviceInfo.transform.GetChild(0).GetComponent<TextMeshProUGUI>().text = "F"; - break; - case 7: - colorDeviceInfo.color = new Color32(205, 218, 73, 255); - colorDeviceInfo.transform.GetChild(0).GetComponent<TextMeshProUGUI>().text = "G"; - break; - case 8: - colorDeviceInfo.color = new Color32(253, 192, 47, 255); - colorDeviceInfo.transform.GetChild(0).GetComponent<TextMeshProUGUI>().text = "H"; - break; - case 9: - colorDeviceInfo.color = new Color32(164, 125, 112, 255); - colorDeviceInfo.transform.GetChild(0).GetComponent<TextMeshProUGUI>().text = "I"; - break; - case 10: - colorDeviceInfo.color = new Color32(97, 125, 138, 255); - colorDeviceInfo.transform.GetChild(0).GetComponent<TextMeshProUGUI>().text = "J"; - break; - case 11: - colorDeviceInfo.color = new Color32(255, 140, 120, 255); - colorDeviceInfo.transform.GetChild(0).GetComponent<TextMeshProUGUI>().text = "K"; - break; - case 12: - colorDeviceInfo.color = new Color32(0, 121, 135, 255); - colorDeviceInfo.transform.GetChild(0).GetComponent<TextMeshProUGUI>().text = "L"; - break; - case 13: - colorDeviceInfo.color = new Color32(30, 223, 145, 255); - colorDeviceInfo.transform.GetChild(0).GetComponent<TextMeshProUGUI>().text = "M"; - break; - case 14: - colorDeviceInfo.color = new Color32(201, 130, 255, 255); - colorDeviceInfo.transform.GetChild(0).GetComponent<TextMeshProUGUI>().text = "N"; - break; - case 15: - colorDeviceInfo.color = new Color32(255, 49, 49, 255); - colorDeviceInfo.transform.GetChild(0).GetComponent<TextMeshProUGUI>().text = "O"; - break; - case 16: - colorDeviceInfo.color = new Color32(68, 74, 255, 255); - colorDeviceInfo.transform.GetChild(0).GetComponent<TextMeshProUGUI>().text = "P"; - break; - case 17: - colorDeviceInfo.color = new Color32(255, 110, 13, 255); - colorDeviceInfo.transform.GetChild(0).GetComponent<TextMeshProUGUI>().text = "Q"; - break; - case 18: - colorDeviceInfo.color = new Color32(84, 67, 59, 255); - colorDeviceInfo.transform.GetChild(0).GetComponent<TextMeshProUGUI>().text = "R"; - break; - case 19: - colorDeviceInfo.color = new Color32(37, 96, 58, 255); - colorDeviceInfo.transform.GetChild(0).GetComponent<TextMeshProUGUI>().text = "S"; - break; - case 20: - colorDeviceInfo.color = new Color32(36, 28, 110, 255); - colorDeviceInfo.transform.GetChild(0).GetComponent<TextMeshProUGUI>().text = "T"; - break; - case 21: - colorDeviceInfo.color = new Color32(168, 94, 94, 255); - colorDeviceInfo.transform.GetChild(0).GetComponent<TextMeshProUGUI>().text = "U"; - break; - case 22: - colorDeviceInfo.color = new Color32(128, 94, 168, 255); - colorDeviceInfo.transform.GetChild(0).GetComponent<TextMeshProUGUI>().text = "V"; - break; - case 23: - colorDeviceInfo.color = new Color32(126, 74, 74, 255); - colorDeviceInfo.transform.GetChild(0).GetComponent<TextMeshProUGUI>().text = "W"; - break; - case 24: - colorDeviceInfo.color = new Color32(131, 183, 151, 255); - colorDeviceInfo.transform.GetChild(0).GetComponent<TextMeshProUGUI>().text = "X"; - break; - case 25: - colorDeviceInfo.color = new Color32(226, 132, 74, 255); - colorDeviceInfo.transform.GetChild(0).GetComponent<TextMeshProUGUI>().text = "Y"; - break; - case 26: - colorDeviceInfo.color = new Color32(255, 68, 212, 255); - colorDeviceInfo.transform.GetChild(0).GetComponent<TextMeshProUGUI>().text = "Z"; - break; - case 27: - colorDeviceInfo.color = new Color32(127, 47, 235, 255); - colorDeviceInfo.transform.GetChild(0).GetComponent<TextMeshProUGUI>().text = "Δ"; - break; - case 28: - colorDeviceInfo.color = new Color32(95, 95, 95, 255); - colorDeviceInfo.transform.GetChild(0).GetComponent<TextMeshProUGUI>().text = "Θ"; - break; - case 29: - colorDeviceInfo.color = new Color32(97, 158, 196, 255); - colorDeviceInfo.transform.GetChild(0).GetComponent<TextMeshProUGUI>().text = "Ξ"; - break; - case 30: - colorDeviceInfo.color = new Color32(214, 167, 113, 255); - colorDeviceInfo.transform.GetChild(0).GetComponent<TextMeshProUGUI>().text = "Φ"; - break; - case 31: - colorDeviceInfo.color = new Color32(123, 53, 110, 255); - colorDeviceInfo.transform.GetChild(0).GetComponent<TextMeshProUGUI>().text = "Ψ"; - break; - case 32: - colorDeviceInfo.color = new Color32(89, 96, 1, 255); - colorDeviceInfo.transform.GetChild(0).GetComponent<TextMeshProUGUI>().text = "Ω"; - break; - case -1: - colorDeviceInfo.color = new Color32(200, 200, 200, 255); - colorDeviceInfo.transform.GetChild(0).GetComponent<TextMeshProUGUI>().text = "-"; - break; - default: - colorDeviceInfo.color = new Color32(200, 200, 200, 255); - colorDeviceInfo.transform.GetChild(0).GetComponent<TextMeshProUGUI>().text = "-"; - break; - } - - HM_Content.contentBackgroundCG = GameObject.FindGameObjectsWithTag("HM_ContentBackground")[0].GetComponent<CanvasGroup>(); - HM_Content.contentBackgroundCG.alpha = 0; - HM_Content.contentBackgroundCG.interactable = false; - HM_Content.contentBackgroundCG.blocksRaycasts = false; - - HM_Content.popupBackgroundCG = GameObject.FindGameObjectsWithTag("HM_PopupBackground")[0].GetComponent<CanvasGroup>(); - HM_Content.popupBackgroundCG.alpha = 0; - HM_Content.popupBackgroundCG.interactable = false; - HM_Content.popupBackgroundCG.blocksRaycasts = false; - - switch(appID) - { - case APP_ID.ELARGIR: - appName.text = "Elargir"; - appImage.sprite = appsImages[0]; - break; - case APP_ID.EVASION: - appName.text = "Evasion"; - appImage.sprite = appsImages[1]; - break; - case APP_ID.LUCIOLE: - appName.text = "Luciole"; - appImage.sprite = appsImages[2]; - break; - case APP_ID.EVALULU: - appName.text = "EvaLulu"; - appImage.sprite = appsImages[3]; - break; - default: - appName.text = "APP NAME"; - appImage.sprite = null; - break; - } - - appVersion.text = "v" + Application.version; - - HM_Scripts.pluginController = this; - - if (!sceneStart) - { - StopPlugin(); - } - } - - void Start() - { - if (HM_NetworkController.currentENV == HM_NetworkController.ENV.DEVELOP) - GameObject.Find("HM_TextVersion").GetComponent<TextMeshProUGUI>().text = "v1.6.5 - DEVELOP"; - else if (HM_NetworkController.currentENV == HM_NetworkController.ENV.PREPROD) - GameObject.Find("HM_TextVersion").GetComponent<TextMeshProUGUI>().text = "v1.6.5 - PREPROD"; - else - GameObject.Find("HM_TextVersion").GetComponent<TextMeshProUGUI>().text = "v1.6.5 - PROD"; - - HM_Scripts.optionPanel.HideButton(true); - - //si démarrage auto, on lance le contenu de choix du profil enfant - if (sceneStart) - { - switch (appID) - { - case APP_ID.ELARGIR: - //tente d'envoyer les données Audio Elargir en attente (si il y en a) - HM_NetworkController.instance.SendAudioData(); - break; - } - - if (HM_DataController.model.teacherAccounts.Count == 0) - { - navContext = NAV_CONTEXT.NEW_TEACHER; - HM_Scripts.contentCodeTeacher.OpenContent(); - } - else - { - HM_DataController.currentChildUser = null; - HM_DataController.currentTeacherAccount = null; - - bool synchroNeeded = false; - - foreach(HM_TeacherAccount t in HM_DataController.model.teacherAccounts) - { - if(t.dataAWS._idToken != null && t.dataAWS._idToken.Length > 0) - { - synchroNeeded = true; - break; - } - } - - if(synchroNeeded && Application.internetReachability != NetworkReachability.NotReachable) - { - HM_Scripts.contentRefreshAWS.OpenContent(); - } - else - { - HM_Scripts.contentProfil.OpenContent(); - } - - } - - } - } - - //Active le Plugin sur un contenu en particulier (ne devrait étre appelé que par le plugin lui méme) - public void StartPlugin(HM_Content content = null) - { - //this.gameObject.SetActive(true); - isActive = true; - isActiveCpt++; - - if(content != null) - { - content.OpenContent(); - } - } - - //Met en pause le Plugin (ne devrait étre appelé que par le plugin lui méme) - public void StopPlugin() - { - //this.gameObject.SetActive(false); - isActiveCpt--; - - if(isActiveCpt <= 0) - { - isActiveCpt = 0; - isActive = false; - - HM_Content.contentBackgroundCG.alpha = 0; - HM_Content.contentBackgroundCG.interactable = false; - HM_Content.contentBackgroundCG.blocksRaycasts = false; - - HM_Content.popupBackgroundCG.alpha = 0; - HM_Content.popupBackgroundCG.interactable = false; - HM_Content.popupBackgroundCG.blocksRaycasts = false; - } - } - - - public bool CheckTeacherCodeValid(string code) - { - //calcul checksum - int checksum = ChecksumTeacherCode(code); - - //vérification si 6ème lettre OK - if (code[5] == (char)('A' + checksum)) - { - return true; - } - - return false; - } - - private int ChecksumTeacherCode(string code) - { - int checksum = 0; - - //checkum via calcul "(1 * lettre1 + 2 * lettre2 + 3 * lettre3 + 4 * lettre4 + 5 * lettre5) modulo 26" - //lettre1~5 étant la position du caractère dans l'alphabet : A=1, B=2, ... - - for (int j = 0; j < 5; j++) - { - checksum += (j + 1) * (int)(code[j] - 64); //-64 pour retrouver la bonne position en partant de A=1 - } - - checksum = checksum % 26;// 0 to 25 - - return checksum; - } - - - - /// <summary> - /// Les fonctions suivantes sont les points d'entrée pour utilisation de ce plugin HM - /// </summary> - - //Démarre le Plugin sur le contenu pour identifier un profil enfant de type "évaluateur", différent du profil actuellement connecté - //Utilisation type : Application Elargir si demande d'évaluation par un pair pour un texte - public static void OpenLoginSecondaryChild() - { - //le profilID est sensé exister dans un contexte normal, car il aura été renseigné via la scéne de démarrage HM_SceneStart - - //on lance la page de choix du profil - HM_Scripts.pluginController.StartPlugin(HM_Scripts.contentProfil); - } - - //Démarre le Plugin sur le contenu pour identifier un professeur afin de configurer l'enfant actuellement connecté - public static void OpenTeacherAdmin(int contextID = -1) - { - //l'appID est sensé exister dans un contexte normal. Il doit étre renseigner sur chaque instance de HM_PluginController existant dans le projet - //(dans la scéne HM_SceneStart et sur toutes les instances prefabs utilisés dans les scénes de l'application) - - if(HM_Scripts.pluginController.appID == APP_ID.NONE) - { - Debug.LogError("Pas de paramétrage possible sans avoir indiqué l'app concernée sur le script HM_PluginController via l'Inspector"); - HM_Log.AppendTextToFile("HM_Log.txt", "OpenTeacherAdmin error : Pas de paramétrage possible sans avoir indiqué l'app concernée sur le script HM_PluginController via l'Inspector"); - return; - } - else if(HM_Scripts.pluginController.appID == APP_ID.EVASION || HM_Scripts.pluginController.appID == APP_ID.EVALULU) - { - Debug.LogError("Pas de paramétrage possible pour cette application"); - HM_Log.AppendTextToFile("HM_Log.txt", "OpenTeacherAdmin error : Pas de paramétrage possible pour cette application"); - return; - } - - switch(HM_Scripts.pluginController.appID) - { - case APP_ID.ELARGIR: - HM_ContentSettingApp_Elargir.contextID = contextID; - break; - case APP_ID.LUCIOLE: - HM_ContentSettingApp_Luciole.contextID = contextID; - break; - } - - //le currentChildUser est sensé exister dans un contexte normal, car il aura été renseigné via la scéne de démarrage HM_SceneStart - if (HM_DataController.currentChildUser == null) - { - Debug.LogError("Le plugin HM ne retrouve pas l'enfant actuellement connecté"); - HM_Log.AppendTextToFile("HM_Log.txt", "OpenTeacherAdmin error : Le plugin HM ne retrouve pas l'enfant actuellement connecté"); - return; - } - - //on lance la page de demande du code enseignant - HM_Scripts.pluginController.StartPlugin(HM_Scripts.contentCodeTeacher); - } - - public static void DisconnectUser() - { - HM_Scripts.pluginController.StartPlugin(HM_Scripts.popupAlertDisconnect); - } - - public void DeleteSaveData() - { - HM_DataController.model.DeleteSaveData(); - } - - public static string GetMainUserID() - { - if (HM_DataController.currentChildUser == null) - { - Debug.LogError("Le plugin HM ne retrouve pas l'enfant actuellement connecté"); - HM_Log.AppendTextToFile("HM_Log.txt", "GetMainUserID error : Le plugin HM ne retrouve pas l'enfant actuellement connecté"); - return ""; - } - - return HM_DataController.currentChildUser.userID; - } - - public static string GetSecondUserID() - { - if (HM_DataController.secondaryChildUser == null) - { - Debug.LogError("Le plugin HM ne retrouve pas l'enfant secondaire actuellement connecté"); - HM_Log.AppendTextToFile("HM_Log.txt", "GetSecondUserID error : Le plugin HM ne retrouve pas l'enfant actuellement connecté"); - return ""; - } - - return HM_DataController.secondaryChildUser.userID; - } - - public static string GetProgression() - { - if (HM_DataController.currentChildUser == null) - { - Debug.LogError("Le plugin HM ne retrouve pas l'enfant actuellement connecté"); - HM_Log.AppendTextToFile("HM_Log.txt", "GetProgression error : Le plugin HM ne retrouve pas l'enfant actuellement connecté"); - return ""; - } - - if (HM_Scripts.pluginController.appID == APP_ID.NONE) - { - Debug.LogWarning("Un script HM_PluginController n'a pas été configuré pour une app en particulier. Merci de renseigner l'app !"); - HM_Log.AppendTextToFile("HM_Log.txt", "GetProgression error : Un script HM_PluginController n'a pas été configuré pour une app en particulier."); - return ""; - } - else if (HM_Scripts.pluginController.appID == APP_ID.EVALULU) - { - Debug.LogError("Cette application n'a pas été configuré pour utiliser cette fonction"); - HM_Log.AppendTextToFile("HM_Log.txt", "GetProgression error : Cette application n'a pas été configuré pour utiliser cette fonction"); - return ""; - } - - switch (HM_Scripts.pluginController.appID) - { - case APP_ID.ELARGIR: - return JsonConvert.SerializeObject(HM_DataController.currentChildUser.appElargirUserData.progression); - case APP_ID.LUCIOLE: - return JsonConvert.SerializeObject(HM_DataController.currentChildUser.appLucioleUserData.progression); - case APP_ID.EVASION: - return JsonConvert.SerializeObject(HM_DataController.currentChildUser.appEvasionUserData.progression); - } - - return ""; - } - - public static void SetProgression(string jsonProgression) - { - if(HM_DataController.currentChildUser == null) - { - Debug.LogError("Le plugin HM ne retrouve pas l'enfant actuellement connecté"); - HM_Log.AppendTextToFile("HM_Log.txt", "SetProgression error : Le plugin HM ne retrouve pas l'enfant actuellement connecté"); - return; - } - - if (HM_Scripts.pluginController.appID == APP_ID.NONE) - { - Debug.LogWarning("Un script HM_PluginController n'a pas été configuré pour une app en particulier. Merci de renseigner l'app !"); - HM_Log.AppendTextToFile("HM_Log.txt", "SetProgression error : Un script HM_PluginController n'a pas été configuré pour une app en particulier."); - return; - } - else if (HM_Scripts.pluginController.appID == APP_ID.EVALULU) - { - Debug.LogError("Cette application n'a pas été configuré pour utiliser cette fonction"); - HM_Log.AppendTextToFile("HM_Log.txt", "SetProgression error : Cette application n'a pas été configuré pour utiliser cette fonction"); - return; - } - - try - { - switch (HM_Scripts.pluginController.appID) - { - case APP_ID.ELARGIR: - //cas particulier : on remet settings.difficultyMode à 0 - HM_DataController.currentChildUser.appElargirUserData.settings.difficultyMode = 0; - HM_DataController.currentChildUser.appElargirUserData.settings.revisionDate = DateTime.UtcNow.ToString("yyyy-MM-ddTHH:mm:ssK"); - - HM_DataController.currentChildUser.appElargirUserData.progression = JsonConvert.DeserializeObject<HM_AppElargirUserProgression>(jsonProgression); - HM_DataController.currentChildUser.appElargirUserData.progression.dateUpdate = DateTime.UtcNow.ToString("yyyy-MM-ddTHH:mm:ssK"); - break; - case APP_ID.LUCIOLE: - HM_DataController.currentChildUser.appLucioleUserData.progression = JsonConvert.DeserializeObject<HM_AppLucioleUserProgression>(jsonProgression); - HM_DataController.currentChildUser.appLucioleUserData.progression.dateUpdate = DateTime.UtcNow.ToString("yyyy-MM-ddTHH:mm:ssK"); - break; - case APP_ID.EVASION: - HM_DataController.currentChildUser.appEvasionUserData.progression = JsonConvert.DeserializeObject<HM_AppEvasionUserProgression>(jsonProgression); - HM_DataController.currentChildUser.appEvasionUserData.progression.dateUpdate = DateTime.UtcNow.ToString("yyyy-MM-ddTHH:mm:ssK"); - break; - } - } - catch (Exception e) - { - Debug.LogError("SetProgression jsonProgression Deserialize ERROR : " + e.Message); - HM_Log.AppendTextToFile("HM_Log.txt", "SetProgression jsonProgression Deserialize ERROR : " + e.Message); - } - - HM_DataController.model.Save(); - } - - public static string GetSettingsSession() - { - if (HM_DataController.currentChildUser == null) - { - Debug.LogError("Le plugin HM ne retrouve pas l'enfant actuellement connecté"); - HM_Log.AppendTextToFile("HM_Log.txt", "GetSettingsSession error : Le plugin HM ne retrouve pas l'enfant actuellement connecté"); - return ""; - } - - if (HM_Scripts.pluginController.appID == APP_ID.NONE) - { - Debug.LogWarning("Un script HM_PluginController n'a pas été configuré pour une app en particulier. Merci de renseigner l'app !"); - HM_Log.AppendTextToFile("HM_Log.txt", "GetSettingsSession error : Un script HM_PluginController n'a pas été configuré pour une app en particulier."); - return ""; - } - else if (HM_Scripts.pluginController.appID == APP_ID.EVALULU) - { - Debug.LogError("Cette application n'a pas été configuré pour utiliser cette fonction"); - HM_Log.AppendTextToFile("HM_Log.txt", "GetSettingsSession error : Cette application n'a pas été configuré pour utiliser cette fonction"); - return ""; - } - - switch (HM_Scripts.pluginController.appID) - { - case APP_ID.ELARGIR: - return JsonConvert.SerializeObject(HM_DataController.currentChildUser.appElargirUserData.settings); - case APP_ID.LUCIOLE: - return JsonConvert.SerializeObject(HM_DataController.currentChildUser.appLucioleUserData.settings); - case APP_ID.EVASION: - return JsonConvert.SerializeObject(HM_DataController.currentChildUser.appEvasionUserData.settings); - } - - return ""; - } - - public static void SetSettingsSession(string jsonSettings) - { - if (HM_DataController.currentChildUser == null) - { - Debug.LogError("Le plugin HM ne retrouve pas l'enfant actuellement connecté"); - HM_Log.AppendTextToFile("HM_Log.txt", "SetSettingsSession error : Le plugin HM ne retrouve pas l'enfant actuellement connecté"); - return; - } - - if (HM_Scripts.pluginController.appID == APP_ID.NONE) - { - Debug.LogWarning("Un script HM_PluginController n'a pas été configuré pour une app en particulier. Merci de renseigner l'app !"); - HM_Log.AppendTextToFile("HM_Log.txt", "SetSettingsSession error : Un script HM_PluginController n'a pas été configuré pour une app en particulier."); - return; - } - else if (HM_Scripts.pluginController.appID == APP_ID.EVALULU) - { - Debug.LogError("Cette application n'a pas été configuré pour utiliser cette fonction"); - HM_Log.AppendTextToFile("HM_Log.txt", "SetSettingsSession error : Cette application n'a pas été configuré pour utiliser cette fonction"); - return; - } - - try - { - switch (HM_Scripts.pluginController.appID) - { - case APP_ID.ELARGIR: - HM_DataController.currentChildUser.appElargirUserData.settings = JsonConvert.DeserializeObject<HM_AppElargirUserSettings>(jsonSettings); - HM_DataController.currentChildUser.appElargirUserData.settings.revisionDate = DateTime.UtcNow.ToString("yyyy-MM-ddTHH:mm:ssK"); - break; - case APP_ID.LUCIOLE: - HM_DataController.currentChildUser.appLucioleUserData.settings = JsonConvert.DeserializeObject<HM_AppLucioleUserSettings>(jsonSettings); - HM_DataController.currentChildUser.appLucioleUserData.settings.revisionDate = DateTime.UtcNow.ToString("yyyy-MM-ddTHH:mm:ssK"); - break; - case APP_ID.EVASION: - HM_DataController.currentChildUser.appEvasionUserData.settings = JsonConvert.DeserializeObject<HM_AppEvasionUserSettings>(jsonSettings); - HM_DataController.currentChildUser.appEvasionUserData.settings.revisionDate = DateTime.UtcNow.ToString("yyyy-MM-ddTHH:mm:ssK"); - break; - } - } - catch (Exception e) - { - Debug.LogError("SetSettingsSession jsonSettings Deserialize ERROR : " + e.Message); - HM_Log.AppendTextToFile("HM_Log.txt", "SetSettingsSession jsonSettings Deserialize ERROR : " + e.Message); - } - - HM_DataController.model.Save(); - } - - - public static void AddResultData(string jsonProgression, float playDuration, string jsonResult) - { - if (HM_DataController.currentChildUser == null) - { - Debug.LogError("Le plugin HM ne retrouve pas l'enfant actuellement connecté"); - HM_Log.AppendTextToFile("HM_Log.txt", "AddResultData error : Le plugin HM ne retrouve pas l'enfant actuellement connecté"); - return; - } - - if (HM_Scripts.pluginController.appID == APP_ID.NONE) - { - Debug.LogWarning("Un script HM_PluginController n'a pas été configuré pour une app en particulier. Merci de renseigner l'app !"); - HM_Log.AppendTextToFile("HM_Log.txt", "AddResultData error : Un script HM_PluginController n'a pas été configuré pour une app en particulier."); - return; - } - else if (HM_Scripts.pluginController.appID == APP_ID.EVALULU) - { - Debug.LogError("Cette application n'a pas été configuré pour utiliser cette fonction"); - HM_Log.AppendTextToFile("HM_Log.txt", "AddResultData error : Cette application n'a pas été configuré pour utiliser cette fonction"); - return; - } - - HM_Log.AppendTextToFile("HM_Log.txt", "AddResultData playDuration reçu : " + playDuration); - SetProgression(jsonProgression); - - switch (HM_Scripts.pluginController.appID) - { - case APP_ID.EVASION: - HM_AppEvasionUserResult resultEvasion = new HM_AppEvasionUserResult(); - resultEvasion.activityId = 834; - resultEvasion.resultId = System.Guid.NewGuid().ToString(); - resultEvasion.userId = HM_DataController.currentChildUser.userID; - resultEvasion.globalDuration = Time.realtimeSinceStartup; - resultEvasion.playDuration = playDuration; - resultEvasion.playDate = DateTime.UtcNow.ToString("yyyy-MM-ddTHH:mm:ssK"); - resultEvasion.taskId = HM_AppEvasionUserResult.taskId_session; - resultEvasion.revisionDate = resultEvasion.playDate; - try - { - JObject o = JObject.Parse(jsonResult); - - //si à tout hasard contient une valeur "appData", cela veut dire qu'on doit désérialiser dans HM_AppEvasionUserResult - if (o.ContainsKey("appData")) - { - HM_AppEvasionUserResult resultEvasionTemp = JsonConvert.DeserializeObject<HM_AppEvasionUserResult>(jsonResult); - resultEvasion.appData = resultEvasionTemp.appData; - } - else//sinon on désérialise dans HM_AppEvasionUserResult_SessionData - { - HM_AppEvasionUserResult_SessionData appDataEvasionTemp = JsonConvert.DeserializeObject<HM_AppEvasionUserResult_SessionData>(jsonResult); - resultEvasion.appData = appDataEvasionTemp; - } - HM_DataController.currentChildUser.appEvasionUserData.results.Add(resultEvasion); - HM_Log.AppendTextToFile("HM_LogResult.txt", JsonConvert.SerializeObject(resultEvasion)); - } - catch(Exception e) - { - Debug.LogError("AddResultData jsonResult Deserialize ERROR : "+e.Message); - HM_Log.AppendTextToFile("HM_Log.txt", "AddResultData jsonResult Deserialize ERROR : " + e.Message); - } - break; - case APP_ID.ELARGIR: - //cas particulier : on remet settings.difficultyMode à 0 - HM_DataController.currentChildUser.appElargirUserData.settings.difficultyMode = 0; - HM_DataController.currentChildUser.appElargirUserData.settings.revisionDate = DateTime.UtcNow.ToString("yyyy-MM-ddTHH:mm:ssK"); - - HM_AppElargirUserResult resultElargir = new HM_AppElargirUserResult(); - resultElargir.activityId = 835; - resultElargir.resultId = System.Guid.NewGuid().ToString(); - resultElargir.userId = HM_DataController.currentChildUser.userID; - resultElargir.globalDuration = Time.realtimeSinceStartup; - resultElargir.playDuration = playDuration; - resultElargir.playDate = DateTime.UtcNow.ToString("yyyy-MM-ddTHH:mm:ssK"); - resultElargir.taskId = HM_AppElargirUserResult.taskId_session; - resultElargir.revisionDate = resultElargir.playDate; - try - { - - JObject o = JObject.Parse(jsonResult); - - //si à tout hasard contient une valeur "appData", cela veut dire qu'on doit désérialiser dans HM_AppElargirUserResult - if (o.ContainsKey("appData")) - { - HM_AppElargirUserResult resultElargirTemp = JsonConvert.DeserializeObject<HM_AppElargirUserResult>(jsonResult); - resultElargir.appData = resultElargirTemp.appData; - } - else//sinon on désérialise dans HM_AppElargirUserResult_SessionData - { - HM_AppElargirUserResult_SessionData appDataElargirTemp = JsonConvert.DeserializeObject<HM_AppElargirUserResult_SessionData>(jsonResult); - resultElargir.appData = appDataElargirTemp; - - } - - //audio présent - if (resultElargir.appData.audio != null && resultElargir.appData.audio.Length > 0 && resultElargir.appData.audio.Split('/').Length > 0) - { - List<HM_DataAudio> audioPending = new List<HM_DataAudio>(); - string audioData = PlayerPrefs.GetString("HM_DataAudio", ""); - - if (audioData != null && audioData.Length > 0) - { - audioPending = JsonConvert.DeserializeObject<List<HM_DataAudio>>(audioData); - } - - string filename = resultElargir.appData.audio.Split('/')[resultElargir.appData.audio.Split('/').Length - 1]; - - HM_DataAudio da = new HM_DataAudio(); - da.localPath = resultElargir.appData.audio; - da.filename = filename; - da.resultID = resultElargir.resultId; - da.childIconID = HM_DataController.currentChildUser.userIconID; - da.childCode = HM_DataController.currentChildUser.loginCode; - da.teacherCode = HM_DataController.currentTeacherAccount.teacherCode; - - resultElargir.appData.audioLink = "audios/" + da.childIconID + "/" + da.childCode + "/" + da.resultID + "/" + da.filename; - - audioPending.Add(da); - - PlayerPrefs.SetString("HM_DataAudio", JsonConvert.SerializeObject(audioPending)); - } - - - HM_DataController.currentChildUser.appElargirUserData.results.Add(resultElargir); - HM_Log.AppendTextToFile("HM_LogResult.txt", JsonConvert.SerializeObject(resultElargir)); - } - catch (Exception e) - { - Debug.LogError("AddResultData jsonResult Deserialize ERROR : " + e.Message); - HM_Log.AppendTextToFile("HM_Log.txt", "AddResultData jsonResult Deserialize ERROR : " + e.Message); - } - break; - case APP_ID.LUCIOLE: - HM_AppLucioleUserResult resultLuciole = new HM_AppLucioleUserResult(); - resultLuciole.activityId = 836; - resultLuciole.resultId = System.Guid.NewGuid().ToString(); - resultLuciole.userId = HM_DataController.currentChildUser.userID; - resultLuciole.globalDuration = Time.realtimeSinceStartup; - resultLuciole.playDuration = playDuration; - resultLuciole.playDate = DateTime.UtcNow.ToString("yyyy-MM-ddTHH:mm:ssK"); - resultLuciole.taskId = HM_AppLucioleUserResult.taskId_session; - resultLuciole.revisionDate = resultLuciole.playDate; - resultLuciole.appData.parcours = HM_DataController.currentChildUser.appLucioleUserData.settings.parcours; - resultLuciole.appData.avancementGlobal = HM_DataController.currentChildUser.appLucioleUserData.progression.lucioleParameters.avancementGlobal; - resultLuciole.appData.avancementCurrentMission = HM_DataController.currentChildUser.appLucioleUserData.progression.lucioleParameters.avancementCurrentMission; - resultLuciole.appData.nbrEtoilesGain = HM_DataController.currentChildUser.appLucioleUserData.progression.lucioleParameters.nbrEtoilesGain; - resultLuciole.appData.nbrEtoilesTotal = HM_DataController.currentChildUser.appLucioleUserData.progression.lucioleParameters.nbrEtoilesTotal; - resultLuciole.appData.currentGrade = HM_DataController.currentChildUser.appLucioleUserData.progression.lucioleParameters.currentGrade; - try - { - JObject o = JObject.Parse(jsonResult); - - //si à tout hasard contient une valeur "appData", cela veut dire qu'on doit désérialiser dans HM_AppLucioleUserResult - if (o.ContainsKey("appData")) - { - HM_AppLucioleUserResult resultLucioleTemp = JsonConvert.DeserializeObject<HM_AppLucioleUserResult>(jsonResult); - resultLuciole.appData = resultLucioleTemp.appData; - } - else//sinon on désérialise dans HM_AppLucioleUserResult_SessionData - { - HM_AppLucioleUserResult_SessionData appDataLuciolerTemp = JsonConvert.DeserializeObject<HM_AppLucioleUserResult_SessionData>(jsonResult); - resultLuciole.appData = appDataLuciolerTemp; - - } - HM_DataController.currentChildUser.appLucioleUserData.results.Add(resultLuciole); - HM_Log.AppendTextToFile("HM_LogResult.txt", JsonConvert.SerializeObject(resultLuciole)); - } - catch (Exception e) - { - Debug.LogError("AddResultData jsonResult Deserialize ERROR : " + e.Message); - HM_Log.AppendTextToFile("HM_Log.txt", "AddResultData jsonResult Deserialize ERROR : " + e.Message); - } - break; - } - - HM_DataController.model.Save(); - - } - - public static void AddResultDataAdmin(string jsonProgression, float playDuration, string jsonResult, int addJours = 0, int addMinutes = 0) - { - SetProgression(jsonProgression); - - switch (HM_Scripts.pluginController.appID) - { - case APP_ID.EVASION: - HM_AppEvasionUserResult resultEvasion = new HM_AppEvasionUserResult(); - resultEvasion.activityId = 834; - resultEvasion.resultId = System.Guid.NewGuid().ToString(); - resultEvasion.userId = HM_DataController.currentChildUser.userID; - resultEvasion.globalDuration = Time.realtimeSinceStartup; - resultEvasion.playDuration = playDuration; - resultEvasion.playDate = DateTime.UtcNow.AddDays(-addJours).AddMinutes(addMinutes).ToString("yyyy-MM-ddTHH:mm:ssK"); - resultEvasion.revisionDate = resultEvasion.playDate; - try - { - HM_AppEvasionUserResult resultEvasionTemp = JsonConvert.DeserializeObject<HM_AppEvasionUserResult>(jsonResult); - resultEvasion.appData = resultEvasionTemp.appData; - resultEvasion.taskId = resultEvasionTemp.taskId; - Debug.Log(resultEvasion.taskId); - - HM_DataController.currentChildUser.appEvasionUserData.results.Add(resultEvasion); - HM_Log.AppendTextToFile("HM_LogResult.txt", JsonConvert.SerializeObject(resultEvasion)); - } - catch (Exception e) - { - Debug.LogError("AddResultData jsonResult Deserialize ERROR : " + e.Message); - HM_Log.AppendTextToFile("HM_Log.txt", "AddResultData jsonResult Deserialize ERROR : " + e.Message); - } - break; - case APP_ID.ELARGIR: - HM_AppElargirUserResult resultElargir = new HM_AppElargirUserResult(); - resultElargir.activityId = 835; - resultElargir.resultId = System.Guid.NewGuid().ToString(); - resultElargir.userId = HM_DataController.currentChildUser.userID; - resultElargir.globalDuration = Time.realtimeSinceStartup; - resultElargir.playDuration = playDuration; - resultElargir.playDate = DateTime.UtcNow.AddDays(-addJours).AddMinutes(addMinutes).ToString("yyyy-MM-ddTHH:mm:ssK"); - resultElargir.revisionDate = resultElargir.playDate; - try - { - HM_AppElargirUserResult resultElargirTemp = JsonConvert.DeserializeObject<HM_AppElargirUserResult>(jsonResult); - resultElargir.appData = resultElargirTemp.appData; - resultElargir.taskId = resultElargirTemp.taskId; - Debug.Log(resultElargir.taskId); - - //audio présent - if (resultElargir.appData.audio != null && resultElargir.appData.audio.Length > 0 && resultElargir.appData.audio.Split('/').Length > 0) - { - List<HM_DataAudio> audioPending = new List<HM_DataAudio>(); - string audioData = PlayerPrefs.GetString("HM_DataAudio", ""); - - if (audioData != null && audioData.Length > 0) - { - audioPending = JsonConvert.DeserializeObject<List<HM_DataAudio>>(audioData); - } - - resultElargir.appData.audio = resultElargir.appData.audio.Replace('\\', '/'); - - string filename = resultElargir.appData.audio.Split('/')[resultElargir.appData.audio.Split('/').Length - 1]; - - HM_DataAudio da = new HM_DataAudio(); - da.localPath = resultElargir.appData.audio; - da.filename = filename; - da.resultID = resultElargir.resultId; - da.childIconID = HM_DataController.currentChildUser.userIconID; - da.childCode = HM_DataController.currentChildUser.loginCode; - da.teacherCode = HM_DataController.currentTeacherAccount.teacherCode; - - resultElargir.appData.audioLink = "audios/" + da.childIconID + "/" + da.childCode + "/" + da.resultID + "/" + da.filename; - - audioPending.Add(da); - - Debug.Log(resultElargir.appData.audioLink); - - PlayerPrefs.SetString("HM_DataAudio", JsonConvert.SerializeObject(audioPending)); - - PlayerPrefs.Save(); - } - - HM_DataController.currentChildUser.appElargirUserData.results.Add(resultElargir); - HM_Log.AppendTextToFile("HM_LogResult.txt", JsonConvert.SerializeObject(resultElargir)); - } - catch (Exception e) - { - Debug.LogError("AddResultData jsonResult Deserialize ERROR : " + e.Message); - HM_Log.AppendTextToFile("HM_Log.txt", "AddResultData jsonResult Deserialize ERROR : " + e.Message); - } - break; - case APP_ID.LUCIOLE: - HM_AppLucioleUserResult resultLuciole = new HM_AppLucioleUserResult(); - resultLuciole.activityId = 836; - resultLuciole.resultId = System.Guid.NewGuid().ToString(); - resultLuciole.userId = HM_DataController.currentChildUser.userID; - resultLuciole.globalDuration = Time.realtimeSinceStartup; - resultLuciole.playDuration = playDuration; - resultLuciole.playDate = DateTime.UtcNow.AddDays(-addJours).AddMinutes(addMinutes).ToString("yyyy-MM-ddTHH:mm:ssK"); - resultLuciole.revisionDate = resultLuciole.playDate; - resultLuciole.appData.parcours = HM_DataController.currentChildUser.appLucioleUserData.settings.parcours; - resultLuciole.appData.avancementGlobal = HM_DataController.currentChildUser.appLucioleUserData.progression.lucioleParameters.avancementGlobal; - resultLuciole.appData.avancementCurrentMission = HM_DataController.currentChildUser.appLucioleUserData.progression.lucioleParameters.avancementCurrentMission; - resultLuciole.appData.nbrEtoilesGain = HM_DataController.currentChildUser.appLucioleUserData.progression.lucioleParameters.nbrEtoilesGain; - resultLuciole.appData.currentGrade = HM_DataController.currentChildUser.appLucioleUserData.progression.lucioleParameters.currentGrade; - try - { - HM_AppLucioleUserResult resultLucioleTemp = JsonConvert.DeserializeObject<HM_AppLucioleUserResult>(jsonResult); - resultLuciole.appData = resultLucioleTemp.appData; - resultLuciole.taskId = resultLucioleTemp.taskId; - Debug.Log(resultLuciole.taskId); - - HM_DataController.currentChildUser.appLucioleUserData.results.Add(resultLuciole); - HM_Log.AppendTextToFile("HM_LogResult.txt", JsonConvert.SerializeObject(resultLuciole)); - } - catch (Exception e) - { - Debug.LogError("AddResultData jsonResult Deserialize ERROR : " + e.Message); - HM_Log.AppendTextToFile("HM_Log.txt", "AddResultData jsonResult Deserialize ERROR : " + e.Message); - } - break; - } - - HM_DataController.model.Save(); - - } - - public static void ResetCurrentUser() - { - if (HM_DataController.currentChildUser == null) - { - Debug.LogError("Le plugin HM ne retrouve pas l'enfant actuellement connecté"); - HM_Log.AppendTextToFile("HM_Log.txt", "ResetCurrentUser error : Le plugin HM ne retrouve pas l'enfant actuellement connecté"); - return; - } - - switch (HM_Scripts.pluginController.appID) - { - case APP_ID.ELARGIR: - HM_AppElargirUserData baseDataElargir = new HM_AppElargirUserData(); - HM_DataController.currentChildUser.appElargirUserData = baseDataElargir; - break; - case APP_ID.LUCIOLE: - HM_AppLucioleUserData baseDataLuciole = new HM_AppLucioleUserData(); - HM_DataController.currentChildUser.appLucioleUserData = baseDataLuciole; - break; - case APP_ID.EVASION: - HM_AppEvasionUserData baseDataEvasion = new HM_AppEvasionUserData(); - HM_DataController.currentChildUser.appEvasionUserData = baseDataEvasion; - break; - } - - HM_DataController.model.Save(); - } - - public static string GetCurrentTeacherCode() - { - if (HM_DataController.currentChildUser == null) - { - Debug.LogError("Le plugin HM ne retrouve pas l'enfant actuellement connecté"); - HM_Log.AppendTextToFile("HM_Log.txt", "GetCurrentTeacherCode error : Le plugin HM ne retrouve pas l'enfant actuellement connecté"); - return null; - } - - if (HM_DataController.currentTeacherAccount == null) - { - Debug.LogError("Le plugin HM ne retrouve pas le professeur actuellement lié à l'enfant connecté"); - HM_Log.AppendTextToFile("HM_Log.txt", "GetCurrentTeacherCode error : Le plugin HM ne retrouve pas le professeur actuellement lié à l'enfant connecté"); - return null; - } - - return HM_DataController.currentTeacherAccount.teacherCode; - - } - - public static List<string> GetAllTeacherAccounts() - { - List<string> teacherCodes = new List<string>(); - - foreach(HM_TeacherAccount t in HM_DataController.model.teacherAccounts) - { - teacherCodes.Add(t.teacherCode); - } - - return teacherCodes; - } - - public static List<HM_ChildUser> GetAllActiveChildsOfTeacher(string teacherCode) - { - List<HM_ChildUser> activeChildAccount = new List<HM_ChildUser>(); - - foreach (HM_TeacherAccount t in HM_DataController.model.teacherAccounts) - { - if(t.teacherCode.ToUpper().Equals(teacherCode.ToUpper())) - { - foreach (HM_ChildUser c in t.childUsers) - { - if (c.activeUser) - { - activeChildAccount.Add(c); - } - } - return activeChildAccount; - } - } - - List<HM_ChildUser> childUsers = GetAllActiveChildsOfTeacher("ABCDEF"); - - foreach(HM_ChildUser child in childUsers) - { - Debug.Log(child.userIconID); - Debug.Log(child.loginCode); - } - - return null; - } - - public void TestSecondUserLoginSuccess() - { - Debug.Log("TestSecondUserLoginSuccess"); - Debug.Log(GetSecondUserID()); - } - public void TestAppSettingsCancel() - { - Debug.Log("TestAppSettingsCancel"); - Debug.Log(GetSettingsSession()); - } - - public void TestAppSettingsEnd() - { - Debug.Log("TestAppSettingsEnd"); - Debug.Log(GetSettingsSession()); - } - - public static void CheckTraceExist(string fileURL, System.Action<int,string> callback, int userIconId = -1, int userLoginCode = -1) - { - HM_Scripts.pluginController.StartPlugin(); - - HM_ReturnInfo returnInfo = new HM_ReturnInfo(); - - if (userIconId == -1 && userLoginCode == -1 && HM_DataController.currentChildUser == null) - { - returnInfo.code = -1; - returnInfo.message = "Le plugin HM ne retrouve pas l'enfant actuellement connecté"; - HM_Scripts.pluginController.StartCoroutine(OnCheckTraceExistResponse(returnInfo, callback)); - return; - } - - if (Application.internetReachability == NetworkReachability.NotReachable) - { - returnInfo.code = -2; - returnInfo.message = "Pas de connexion Internet détecté"; - HM_Scripts.pluginController.StartCoroutine(OnCheckTraceExistResponse(returnInfo, callback)); - return; - } - - if (HM_DataController.currentTeacherAccount.dataAWS._idToken == null - || HM_DataController.currentTeacherAccount.dataAWS._idToken.Length == 0 - || HM_DataController.currentTeacherAccount.dataAWS.identityId == null - || HM_DataController.currentTeacherAccount.dataAWS.identityId.Length == 0) - { - returnInfo.code = -3; - returnInfo.message = "Compte professeur non authentifié"; - HM_Scripts.pluginController.StartCoroutine(OnCheckTraceExistResponse(returnInfo, callback)); - return; - } - - if ((userIconId == -1 && userLoginCode != -1) || (userIconId != -1 && userLoginCode == -1)) - { - returnInfo.code = -4; - returnInfo.message = "Une des deux données userIconId ou userLoginCode n'est pas renseigné"; - HM_Scripts.pluginController.StartCoroutine(OnCheckTraceExistResponse(returnInfo, callback)); - return; - } - - fileURL = fileURL.Replace('\\', '/'); - - //construction URL - string filename = fileURL.Split('/')[fileURL.Split('/').Length - 1]; - string appName = ""; - switch (HM_Scripts.pluginController.appID) - { - case APP_ID.NONE: - appName = "none"; - break; - case APP_ID.LUCIOLE: - appName = "luciole"; - break; - case APP_ID.ELARGIR: - appName = "elargir"; - break; - case APP_ID.EVASION: - appName = "evasion"; - break; - case APP_ID.EVALULU: - appName = "evalulu"; - break; - } - - string serverPath = "private/" + HM_DataController.currentTeacherAccount.dataAWS.identityId + "/traces/" + appName + "/"; - - if (userIconId != -1 && userLoginCode != -1) - { - serverPath += userIconId + "/" + userLoginCode + "/" + filename; - } - else - { - serverPath += HM_DataController.currentChildUser.userIconID + "/" + HM_DataController.currentChildUser.loginCode + "/" + filename; - } - - Task.Run(async () => - { - returnInfo = await HM_NetworkController.instance.S3List_v2(serverPath); - - UnityMainThreadDispatcher.Instance().Enqueue(OnCheckTraceExistResponse(returnInfo, callback)); - }); - } - - private static IEnumerator OnCheckTraceExistResponse(HM_ReturnInfo returnInfo, System.Action<int, string> callback) - { - HM_Scripts.pluginController.StopPlugin(); - - if (returnInfo.code > 0) - { - callback.Invoke(1, "Le fichier a été trouvé sur le serveur"); - } - else if(returnInfo.code == 0) - { - callback.Invoke(0, "Le fichier n'a pas été trouvé sur le serveur"); - } - else - { - callback.Invoke(returnInfo.code, returnInfo.message); - - string logMsg = "OnCheckTraceExistResponse ERROR " + returnInfo.code + " / " + returnInfo.message; - Debug.LogError(logMsg); - HM_Log.AppendTextToFile("HM_Log.txt", logMsg); - } - - yield return null; - } - - public static void UploadTrace(string fileURL, System.Action<int, string> callback, int userIconId = -1, int userLoginCode = -1) - { - HM_Scripts.pluginController.StartPlugin(); - - HM_ReturnInfo returnInfo = new HM_ReturnInfo(); - - if (userIconId == -1 && userLoginCode == -1 && HM_DataController.currentChildUser == null) - { - returnInfo.code = -1; - returnInfo.message = "Le plugin HM ne retrouve pas l'enfant actuellement connecté"; - HM_Scripts.pluginController.StartCoroutine(OnUploadTraceResponse(returnInfo, callback)); - return; - } - - if (Application.internetReachability == NetworkReachability.NotReachable) - { - returnInfo.code = -2; - returnInfo.message = "Pas de connexion Internet détecté"; - HM_Scripts.pluginController.StartCoroutine(OnUploadTraceResponse(returnInfo, callback)); - return; - } - - if (HM_DataController.currentTeacherAccount.dataAWS._idToken == null - || HM_DataController.currentTeacherAccount.dataAWS._idToken.Length == 0 - || HM_DataController.currentTeacherAccount.dataAWS.identityId == null - || HM_DataController.currentTeacherAccount.dataAWS.identityId.Length == 0) - { - returnInfo.code = -3; - returnInfo.message = "Compte professeur non authentifié"; - HM_Scripts.pluginController.StartCoroutine(OnUploadTraceResponse(returnInfo, callback)); - return; - } - - if ((userIconId == -1 && userLoginCode != -1) || (userIconId != -1 && userLoginCode == -1)) - { - returnInfo.code = -4; - returnInfo.message = "Une des deux données userIconId ou userLoginCode n'est pas renseigné"; - HM_Scripts.pluginController.StartCoroutine(OnUploadTraceResponse(returnInfo, callback)); - return; - } - - fileURL = fileURL.Replace('\\', '/'); - - //construction URL - string filename = fileURL.Split('/')[fileURL.Split('/').Length - 1]; - string appName = ""; - switch (HM_Scripts.pluginController.appID) - { - case APP_ID.NONE: - appName = "none"; - break; - case APP_ID.LUCIOLE: - appName = "luciole"; - break; - case APP_ID.ELARGIR: - appName = "elargir"; - break; - case APP_ID.EVASION: - appName = "evasion"; - break; - case APP_ID.EVALULU: - appName = "evalulu"; - break; - } - - string serverPath = "private/" + HM_DataController.currentTeacherAccount.dataAWS.identityId + "/traces/" + appName + "/"; - - if (userIconId != -1 && userLoginCode != -1) - { - serverPath += userIconId + "/" + userLoginCode + "/" + filename; - } - else - { - serverPath += HM_DataController.currentChildUser.userIconID + "/" + HM_DataController.currentChildUser.loginCode + "/" + filename; - } - - Task.Run(async () => - { - returnInfo = await HM_NetworkController.instance.S3Upload_v2(fileURL,serverPath); - - UnityMainThreadDispatcher.Instance().Enqueue(OnUploadTraceResponse(returnInfo, callback)); - }); - } - - private static IEnumerator OnUploadTraceResponse(HM_ReturnInfo returnInfo, System.Action<int, string> callback) - { - HM_Scripts.pluginController.StopPlugin(); - - if (returnInfo.code == 0) - { - callback.Invoke(0, "Le fichier a bien été uploadé"); - } - else - { - callback.Invoke(returnInfo.code, returnInfo.message); - - string logMsg = "OnUploadTraceResponse ERROR " + returnInfo.code + " / " + returnInfo.message; - Debug.LogError(logMsg); - HM_Log.AppendTextToFile("HM_Log.txt", logMsg); - } - - yield return null; - } -} diff --git a/Assets/TRANS3_PluginHM/Scripts/Controllers/HM_PluginController.cs.bak.meta b/Assets/TRANS3_PluginHM/Scripts/Controllers/HM_PluginController.cs.bak.meta deleted file mode 100644 index b3f445e34722b31ed9f1e3c5495749bbbf0d6958..0000000000000000000000000000000000000000 --- a/Assets/TRANS3_PluginHM/Scripts/Controllers/HM_PluginController.cs.bak.meta +++ /dev/null @@ -1,7 +0,0 @@ -fileFormatVersion: 2 -guid: 96322bb3e8a6cbc45b69365da6e31613 -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/mainManager.cs b/Assets/mainManager.cs index 1ff8b9c63ab7925f8bfdc13e9886ce800b82ecaf..1ef6f98b5d6c74cfe2a12b2ca805c50ea2014f7d 100644 --- a/Assets/mainManager.cs +++ b/Assets/mainManager.cs @@ -805,7 +805,10 @@ public class mainManager : MonoBehaviour //texteFinSession.text = "FIN DE SESSION / Envoi des traces au serveur en cours..."; } - + public void launchTerminateScene() + { + StartCoroutine(terminateScene()); + } public IEnumerator terminateScene() { if (deconnexionPlusRAZ) diff --git a/Assets/uploadStaticMechanism.cs b/Assets/uploadStaticMechanism.cs new file mode 100644 index 0000000000000000000000000000000000000000..e19bb55b4a64599bf63c71bccfeb6228440684be --- /dev/null +++ b/Assets/uploadStaticMechanism.cs @@ -0,0 +1,531 @@ +using System.Collections; +using System.Collections.Generic; +using UnityEngine; +using System.Linq; +using System.IO; +using static EvaluluScript_SendTracesFromHMSceneStart; +using System; + +public static class uploadStaticMechanism +{ + // Start is called before the first frame update + private static bool currentlySending = false; + private static int nbOfFilesToUpload = 0; + private static int nbOfFilesUploaded = 0; + private static List<path_andteacherid_and_userid> savedFilesWaitingToBeUploaded; + private static string pathDirectory; + private static string pathDirectoryArchive; + private static string PathDirectoryTemporary; + private static string pathDirectoryArchiveAncien; + private static string currentlySentFilePath = ""; + private static string currentlySentTemporaryFilePath = ""; + private static bool terminateSceneAFterTransfert = false; + private static mainManager mM; + private static bool fromhmscenestart = false; + private static bool isthereOldArchivesTotest = false; + private static int indexArchiveToTestExistenceOnServer = 0; + private static bool modeCheckIfExistsOnServer = false; + + public class path_andteacherid_and_userid + { + public string path; + public string teachercode; + public string usercode; + public int usericonID; + public bool isOldArchive; + public bool existsAlreadyOnTheServer; + } + + [System.Serializable] + public class NewSystemeDeTracesJSONRoot + { + public string deviceUniqueID; + public string fluenceId; + public string teacherCode; + public string loginCode; + public string userID; + public string userIconID; + } + + public static void sendTraces(bool fromhmscenestart1 = false, List<string> successSynchroAccount = null, bool terminateSceneAFterTrasfert1 = false, mainManager mM1=null) + { + modeCheckIfExistsOnServer = true; + //Debug.LogError("sendTraces thisTeacherCode="+ thisTeacherCode+ " loginCode = "+ loginCode); + pathDirectory = Application.persistentDataPath + "/newSystemeTraces/"; + pathDirectoryArchive = Application.persistentDataPath + "/newSystemeTraces/ArchiveReal"; + pathDirectoryArchiveAncien = Application.persistentDataPath + "/newSystemeTraces/Archive"; + PathDirectoryTemporary = Application.persistentDataPath + "/newSystemeTraces/Temporary"; + + if (!Directory.Exists(pathDirectory)) + { + // Si le dossier n'existe pas, le créer + Directory.CreateDirectory(pathDirectory); + } + if (!Directory.Exists(pathDirectoryArchive)) + { + // Si le dossier n'existe pas, le créer + Directory.CreateDirectory(pathDirectoryArchive); + } + if (!Directory.Exists(pathDirectoryArchiveAncien)) + { + // Si le dossier n'existe pas, le créer + Directory.CreateDirectory(pathDirectoryArchiveAncien); + } + if (!Directory.Exists(PathDirectoryTemporary)) + { + // Si le dossier n'existe pas, le créer + Directory.CreateDirectory(PathDirectoryTemporary); + } + + mM = mM1; + + terminateSceneAFterTransfert = terminateSceneAFterTrasfert1; + if (!currentlySending) + { + nbFilesReallyUploaded = 0; + isthereOldArchivesTotest = false; + fromhmscenestart = fromhmscenestart1; + currentlySending = true; + nbOfFilesToUpload = 0; + nbOfFilesUploaded = 0; + savedFilesWaitingToBeUploaded = new List<path_andteacherid_and_userid>(); + savedFilesWaitingToBeUploaded.Clear(); + string[] savedFilesWaitingToBeUploaded_temp1 = Directory.GetFiles(pathDirectory, "*.json"); // attention, ici on prend TOUT les fichiers sans distinction alors qu'il faudrait à minima check le enseignant ID + string[] savedFilesWaitingToBeUploaded_inOldArciveFolder_temp = Directory.GetFiles(pathDirectoryArchiveAncien, "*.json"); // attention, ici on prend TOUT les fichiers sans distinction alors qu'il faudrait à minima check le enseignant ID + string[] savedFilesWaitingToBeUploaded_temp = savedFilesWaitingToBeUploaded_temp1.Concat(savedFilesWaitingToBeUploaded_inOldArciveFolder_temp).ToArray(); + if (fromhmscenestart) + { + foreach (string teacheraccount in successSynchroAccount) + { + //Debug.LogError("account in successSynchroAccount = " + teacheraccount); + List<HM_ChildUser> childUsers = HM_PluginController.GetAllActiveChildsOfTeacher(teacheraccount); + if (childUsers != null) + { + foreach (HM_ChildUser child in childUsers) + { + //Debug.Log("userIconID=" + child.userIconID + " loginCode=" + child.loginCode + " userID=" + child.userID); + //si besoin ça c'est l'UUID qui est aussi renvoyé par la fonction "GetMainUserID" (au où tu l'utilisais pour identifier les élèves, permettra du coup de faire le lien) + foreach (string filePath in savedFilesWaitingToBeUploaded_temp) + { + // Lire le contenu du fichier JSON + string jsonContent = System.IO.File.ReadAllText(filePath); + + // Désérialiser le JSON en une instance de la classe + NewSystemeDeTracesJSONRoot data = JsonUtility.FromJson<NewSystemeDeTracesJSONRoot>(jsonContent); + + // Accéder aux propriétés nécessaires + string teacherCode = data.teacherCode; + string logincodeuser = data.loginCode; + // Faire quelque chose avec les valeurs, par exemple, les imprimer dans la console + + if (teacherCode == teacheraccount && logincodeuser == child.loginCode) + { + path_andteacherid_and_userid aaa = new path_andteacherid_and_userid(); + aaa.path = filePath; + aaa.teachercode = teacherCode; + aaa.usericonID = child.userIconID; + aaa.usercode = logincodeuser; + aaa.existsAlreadyOnTheServer = false; + //Debug.LogError("bingo"); + //Debug.Log($"Fichier : {filePath}, teacherCode : {teacherCode}, userIconID : {usericonID}"); + if (filePath.Contains("Archive")) + { + aaa.isOldArchive = true; + isthereOldArchivesTotest = true; + + } + else + { + aaa.isOldArchive = false; + } + savedFilesWaitingToBeUploaded.Add(aaa); + } + } + } + } + } + } + else + { + //Debug.Log("userIconID="+child.userIconID+ " loginCode="+ child.loginCode+ " userID="+ child.userID); + //si besoin ça c'est l'UUID qui est aussi renvoyé par la fonction "GetMainUserID" (au où tu l'utilisais pour identifier les élèves, permettra du coup de faire le lien) + foreach (string filePath in savedFilesWaitingToBeUploaded_temp) + { + // Lire le contenu du fichier JSON + string jsonContent = System.IO.File.ReadAllText(filePath); + + // Désérialiser le JSON en une instance de la classe + NewSystemeDeTracesJSONRoot data = JsonUtility.FromJson<NewSystemeDeTracesJSONRoot>(jsonContent); + + // Accéder aux propriétés nécessaires + string teacherCode = data.teacherCode; + string usericonID = data.userIconID; + string logincodeuser = data.loginCode; + // Faire quelque chose avec les valeurs, par exemple, les imprimer dans la console + + if (HM_DataController.currentTeacherAccount != null && teacherCode == HM_DataController.currentTeacherAccount.teacherCode && logincodeuser == HM_DataController.currentChildUser.loginCode) + { + path_andteacherid_and_userid aaa = new path_andteacherid_and_userid(); + aaa.path = filePath; + aaa.teachercode = teacherCode; + aaa.usericonID = HM_DataController.currentChildUser.userIconID; + aaa.usercode = logincodeuser; + aaa.existsAlreadyOnTheServer = false; + //Debug.LogError("bingo"); + //Debug.Log($"Fichier : {filePath}, teacherCode : {teacherCode}, userIconID : {usericonID}"); + if (filePath.Contains("Archive")) + { + aaa.isOldArchive = true; + isthereOldArchivesTotest = true; + } + else + { + aaa.isOldArchive = false; + } + savedFilesWaitingToBeUploaded.Add(aaa); + } + } + } + Debug.Log("au final on a à uploader et/ou a verifier " + savedFilesWaitingToBeUploaded.Count + " fichiers"); + + + if (!Directory.Exists(pathDirectoryArchive)) + { + Directory.CreateDirectory(pathDirectoryArchive); + } + if (!Directory.Exists(PathDirectoryTemporary)) + { + Directory.CreateDirectory(PathDirectoryTemporary); + } + else + { + deleteTemporaryFiles(); + } + nbOfFilesToUpload = savedFilesWaitingToBeUploaded.Count; + + if (nbOfFilesToUpload > 0) + { + if (isthereOldArchivesTotest && modeCheckIfExistsOnServer) + { + Debug.Log("START CHECK ARCHIVES ON SERVER"); + + indexArchiveToTestExistenceOnServer = 0; + compteurArchiveAlreadyexisting = 0; + + isEligibleArchive(savedFilesWaitingToBeUploaded[indexArchiveToTestExistenceOnServer]); + } + else + { + Debug.Log("NOT CHECKING ARCHIVES ON SERVER"); + uploadOnefichierTraceToHM(); + } + } + else + { + endAllUploads(); + } + } + } + private static int compteurArchiveAlreadyexisting; + private static void isEligibleArchive(path_andteacherid_and_userid archTotest) + { + if (archTotest.isOldArchive) + { + try + { + if (fromhmscenestart) + { + HM_PluginController.CheckTraceExist(archTotest.path, callBackIsEligibleArchive, archTotest.teachercode, archTotest.usericonID, archTotest.usercode); + + } + else + { + HM_PluginController.CheckTraceExist(archTotest.path, callBackIsEligibleArchive); + + } + } + catch (Exception ex) + { + // Gérez toute exception survenue lors de l'appel à CheckTraceExist ici. + Debug.LogError("Erreur lors de l'appel à CheckTraceExist : " + ex.Message); + endAllUploads(); + } + } + else + { + checkNextArchive(); + } + + } + + + + private static void callBackIsEligibleArchive(int resultCode, string resultMessage) + { + //Debug.LogError("CheckArchive exists on server : " + resultCode + " resultMessage=" + resultMessage); + savedFilesWaitingToBeUploaded[indexArchiveToTestExistenceOnServer].existsAlreadyOnTheServer = false; + if (resultCode > 0) + { + compteurArchiveAlreadyexisting++; + // exists + //Debug.LogError("EXISTS ON THE SERVER !"); + savedFilesWaitingToBeUploaded[indexArchiveToTestExistenceOnServer].existsAlreadyOnTheServer = true; + } + else if (resultCode == 0) + { + //Debug.LogError("DOES NOT EXISTS ON THE SERVER !"); + // doesnot exists + } + else + { + //Debug.LogError("ERROR WITH WIFI OR WITH THE SERVER !"); + // erreur + } + checkNextArchive(); + } + + private static void checkNextArchive() + { + indexArchiveToTestExistenceOnServer++; + if (indexArchiveToTestExistenceOnServer >= savedFilesWaitingToBeUploaded.Count) + { + Debug.Log("ENDING ARCHIVE CHECK UP compteurArchiveAlreadyexisting="+ compteurArchiveAlreadyexisting+ " savedFilesWaitingToBeUploaded.Count="+ savedFilesWaitingToBeUploaded.Count); + uploadOnefichierTraceToHM(); + } + else + { + isEligibleArchive(savedFilesWaitingToBeUploaded[indexArchiveToTestExistenceOnServer]); + } + } + + private static void deleteTemporaryFiles() + { + // Obtenez la liste de tous les fichiers dans le dossier spécifié. + string[] files = Directory.GetFiles(PathDirectoryTemporary); + + foreach (string filePath in files) + { + if (Path.GetExtension(filePath) == ".json") + { + try + { + // Supprimez le fichier s'il a l'extension .json. + File.Delete(filePath); + ////Debug.Log("Fichier supprimé : " + filePath); + } + catch (Exception e) + { + ////Debug.LogError("Erreur lors de la suppression du fichier : " + e.Message); + } + } + } + } + private static int nbFilesReallyUploaded = 0; + private static void uploadOnefichierTraceToHM() + { + if (nbOfFilesUploaded >= savedFilesWaitingToBeUploaded.Count) + { + endAllUploads(); + } + else + { + + if (savedFilesWaitingToBeUploaded[nbOfFilesUploaded].existsAlreadyOnTheServer) + { + //Debug.Log("exists already on server, so we move it locally from the old Archive folder to the realArchive folder. path =" + savedFilesWaitingToBeUploaded[nbOfFilesUploaded].path); + string fileName = Path.GetFileName(savedFilesWaitingToBeUploaded[nbOfFilesUploaded].path); + // Créez le chemin complet du fichier de destination dans le nouveau dossier + string destinationARCHIVEFilePath = Path.Combine(pathDirectoryArchive, fileName); + // Déplacez le fichier source vers le dossier de destination + ////Debug.Log("fichierTemporary moved in archive" + fichierTemporary); + if (File.Exists(savedFilesWaitingToBeUploaded[nbOfFilesUploaded].path)) + { + if (!File.Exists(destinationARCHIVEFilePath)) + { + File.Move(savedFilesWaitingToBeUploaded[nbOfFilesUploaded].path, destinationARCHIVEFilePath); + //Debug.Log("old archive already existing on the server was moved into realArchive folder"); + } + else + { + File.Delete(savedFilesWaitingToBeUploaded[nbOfFilesUploaded].path); + //Debug.Log("old archive already existing on the server also already existed in the realArchive folder, so we delete it"); + + } + } + + if (nbOfFilesUploaded == nbOfFilesToUpload - 1) + { + //Debug.Log("old archive already existing on the server was the last piece to review. End all uploads now"); + + endAllUploads(); + + } + else + { + // le transfeet précédent c'est bien passé (retour == 0) on lance le fichier suivant + nbOfFilesUploaded++; + uploadOnefichierTraceToHM(); + } + } + else + { + + currentlySentFilePath = savedFilesWaitingToBeUploaded[nbOfFilesUploaded].path; + // Le fichier JSON existe, donc nous le lisons + string dateEnvoi = DateTime.Now.ToString("dd-MM-yyyy-HH-mm-ss"); + + string nouveauNomAvecDate = Path.GetFileNameWithoutExtension(currentlySentFilePath) + "-" + dateEnvoi + ".json"; + //Debug.Log("on etudie " + currentlySentFilePath); + if (savedFilesWaitingToBeUploaded[nbOfFilesUploaded].isOldArchive) + { + //Debug.LogError("on traite une archive là"); + nouveauNomAvecDate = Path.GetFileNameWithoutExtension(currentlySentFilePath) + "-ARC-" + dateEnvoi + ".json"; + } + + + + currentlySentTemporaryFilePath = Path.Combine(PathDirectoryTemporary, nouveauNomAvecDate); + //Debug.Log("nouveauNomAvecDate = " + nouveauNomAvecDate + " currentlySentTemporaryFilePath=" + currentlySentTemporaryFilePath); + // Copiez le fichier source vers le dossier de destination en le renommant si nécessaire. + + File.Copy(currentlySentFilePath, currentlySentTemporaryFilePath, true); + if (File.Exists(currentlySentTemporaryFilePath)) + { + try + { + string teachercode = savedFilesWaitingToBeUploaded[nbOfFilesUploaded].teachercode; + int userIconID = savedFilesWaitingToBeUploaded[nbOfFilesUploaded].usericonID; + string userloginCode = savedFilesWaitingToBeUploaded[nbOfFilesUploaded].usercode; + if (fromhmscenestart) + { + HM_PluginController.UploadTrace(currentlySentTemporaryFilePath, uploadOneFileAsynchroneFinished, teachercode, userIconID, userloginCode); + + } + else + { + HM_PluginController.UploadTrace(currentlySentTemporaryFilePath, uploadOneFileAsynchroneFinished); + + } + } + catch (Exception ex) + { + // Gérez toute exception survenue lors de l'appel à CheckTraceExist ici. + Debug.LogError("Erreur lors de l'appel à UploadTrace : " + ex.Message); + deletecurrentFileFromTemporaryFolder(false); + endAllUploads(); + } + } + else + { + Debug.LogError("Traces 2 - ne devrait jamais arriver"); + deletecurrentFileFromTemporaryFolder(false); + endAllUploads(); + /* sauf si : + * Fichier source inexistant : Si le fichier source spécifié n'existe pas, la copie échouera. + Permissions insuffisantes : Si l'application n'a pas les permissions nécessaires pour lire le fichier source ou écrire dans le répertoire de destination, la copie échouera. + Espace disque insuffisant : Si le disque de destination est plein ou manque d'espace, la copie échouera. + Fichier de destination verrouillé : Si le fichier de destination est déjà ouvert ou verrouillé par une autre application, la copie échouera. + Problèmes matériels : Des problèmes matériels, tels que des secteurs défectueux sur le disque, peuvent entraîner des erreurs lors de la copie + */ + } + } + + } + + + } + + private static void deletecurrentFileFromTemporaryFolder(bool SuccesSomoveitToTheArchiveFolder) + { + if (SuccesSomoveitToTheArchiveFolder) + { + // Obtenez le nom du fichier sans le chemin + string fileName = Path.GetFileName(currentlySentTemporaryFilePath); + // Créez le chemin complet du fichier de destination dans le nouveau dossier + string destinationARCHIVEFilePath = Path.Combine(pathDirectoryArchive, fileName); + // Déplacez le fichier source vers le dossier de destination + ////Debug.Log("fichierTemporary moved in archive" + fichierTemporary); + if (File.Exists(currentlySentTemporaryFilePath)) + { + if (!File.Exists(destinationARCHIVEFilePath)) + { + File.Move(currentlySentTemporaryFilePath, destinationARCHIVEFilePath); + } + else + { + File.Delete(currentlySentTemporaryFilePath); + } + } + ////Debug.Log("ToDeleteOriginalFilePath = " + fichierOriginal); + // et on supprime le fichier original vu qu'il a été mis dans l'archive + if (File.Exists(currentlySentFilePath)) + { + File.Delete(currentlySentFilePath); + ////Debug.Log("fichier original deleted " + fichierOriginal); + } + else + { + ////Debug.Log("le fichier original n'existe pas "); + } + } + else + { + // on supprime le fichier de temporary + if (File.Exists(currentlySentTemporaryFilePath)) + { + File.Delete(currentlySentTemporaryFilePath); + ////Debug.Log("fichier original deleted " + fichierOriginal); + } + } + } + + private static void uploadOneFileAsynchroneFinished(int resultCode, string resultMessage) + { + //Debug.LogError("resultCode=" + resultCode + " resultMessage=" + resultMessage + " nombreDeFichiersTraites=" + nbOfFilesUploaded + " nombreDeFichiersATransferer=" + nbOfFilesToUpload); + ////Debug.Log("transfertAsynchroneFinished resultCode = " + resultCode.ToString() + " resultMessage=" + resultMessage + " nombreDeFichiersTraites = " + nombreDeFichiersTraites); + + if (resultCode == 1 || resultCode == 0) + { + nbFilesReallyUploaded++; + deletecurrentFileFromTemporaryFolder(true); + if (nbOfFilesUploaded == nbOfFilesToUpload - 1) + { + endAllUploads(); + + } + else + { + // le transfeet précédent c'est bien passé (retour == 0) on lance le fichier suivant + nbOfFilesUploaded++; + uploadOnefichierTraceToHM(); + } + + + // Bien passé + } + else + { + Debug.LogError("erreur lors de l'envoi on stop tout"); + deletecurrentFileFromTemporaryFolder(false); + endAllUploads(); + } + } + + private static void endAllUploads() + { + Debug.LogError("endTransferts nbFilesReallyUploaded="+ nbFilesReallyUploaded); + nbOfFilesUploaded = 0; + nbOfFilesToUpload = 0; + nbFilesReallyUploaded = 0; + currentlySending = false; + if (terminateSceneAFterTransfert && mM != null) + { + // StartCoroutine(mM.fenetrePause.terminateScenefterDeconnexionAndTracesSent()); + mM.launchTerminateScene(); + } + else + { + + } + } +} diff --git a/Assets/uploadStaticMechanism.cs.meta b/Assets/uploadStaticMechanism.cs.meta new file mode 100644 index 0000000000000000000000000000000000000000..cc607825fbfa7243fa0b2f176bcebfeee80bcd1a --- /dev/null +++ b/Assets/uploadStaticMechanism.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: a3e9eb3657d2d664880cb20f8f2e4626 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/ProjectSettings/ProjectSettings.asset b/ProjectSettings/ProjectSettings.asset index 7524a0451fa6bb5429f69b3cd78304634ee7a4f3..1f41c2eb03be89937da4a4564bb12f40d60bfb41 100644 --- a/ProjectSettings/ProjectSettings.asset +++ b/ProjectSettings/ProjectSettings.asset @@ -136,7 +136,7 @@ PlayerSettings: vulkanEnableLateAcquireNextImage: 0 vulkanEnableCommandBufferRecycling: 1 loadStoreDebugModeEnabled: 0 - bundleVersion: 1.12 + bundleVersion: 1.14 preloadedAssets: [] metroInputSource: 0 wsaTransparentSwapchain: 0 @@ -166,7 +166,7 @@ PlayerSettings: iPhone: 0 tvOS: 0 overrideDefaultApplicationIdentifier: 1 - AndroidBundleVersionCode: 4 + AndroidBundleVersionCode: 6 AndroidMinSdkVersion: 22 AndroidTargetSdkVersion: 0 AndroidPreferredInstallLocation: 1 diff --git a/UserSettings/EditorUserSettings.asset b/UserSettings/EditorUserSettings.asset index 28713ce9afc5081263d4e6278e94a67d4ef11394..65f0d78740cb0eee7960c40a5aac01f5f2fe9f3c 100644 --- a/UserSettings/EditorUserSettings.asset +++ b/UserSettings/EditorUserSettings.asset @@ -18,16 +18,16 @@ EditorUserSettings: value: 5254025f52035803555609204677074444164f7c2f797664757a1861e1e66268 flags: 0 RecentlyUsedSceneGuid-4: - value: 51530603000d5e0a5c0c5a7044705c44404f1a7d7b2d20607a714d66b4b9626a + value: 5057510250560c5d5d0a0a7312225d44424e4d737e7b246928781f61b6e4373c flags: 0 RecentlyUsedSceneGuid-5: - value: 5057510250560c5d5d0a0a7312225d44424e4d737e7b246928781f61b6e4373c + value: 025701560657515e545d0926447508454e474f2f797820647b7d4c35e1b93661 flags: 0 RecentlyUsedSceneGuid-6: - value: 515250075c0c595e5f5a5e71122159444e4e4a2f7a7d7f602f284d66b4b76661 + value: 51530603000d5e0a5c0c5a7044705c44404f1a7d7b2d20607a714d66b4b9626a flags: 0 RecentlyUsedSceneGuid-7: - value: 025701560657515e545d0926447508454e474f2f797820647b7d4c35e1b93661 + value: 515250075c0c595e5f5a5e71122159444e4e4a2f7a7d7f602f284d66b4b76661 flags: 0 RecentlyUsedSceneGuid-8: value: 52045152560d5d025858542140750e44404f4d2b74797431292b1f66b1e5373c diff --git a/UserSettings/Layouts/CurrentMaximizeLayout.dwlt b/UserSettings/Layouts/CurrentMaximizeLayout.dwlt index 489620f631ae816a72ec210d3431c3c32918cc74..0c038d6845a2d80587111e9b6f6d01690b1d1ce7 100644 --- a/UserSettings/Layouts/CurrentMaximizeLayout.dwlt +++ b/UserSettings/Layouts/CurrentMaximizeLayout.dwlt @@ -19,12 +19,12 @@ MonoBehaviour: serializedVersion: 2 x: 0 y: 30 - width: 2560 - height: 1289 + width: 1536 + height: 722.8 m_MinSize: {x: 300, y: 100} m_MaxSize: {x: 24288, y: 16192} vertical: 0 - controlID: 683 + controlID: 38 --- !u!114 &2 MonoBehaviour: m_ObjectHideFlags: 52 @@ -34,21 +34,21 @@ MonoBehaviour: m_GameObject: {fileID: 0} m_Enabled: 1 m_EditorHideFlags: 1 - m_Script: {fileID: 12015, guid: 0000000000000000e000000000000000, type: 0} + m_Script: {fileID: 12003, guid: 0000000000000000e000000000000000, type: 0} m_Name: m_EditorClassIdentifier: - m_MinSize: {x: 200, y: 200} + m_MinSize: {x: 100, y: 100} m_MaxSize: {x: 4000, y: 4000} m_TitleContent: - m_Text: Game - m_Image: {fileID: -6423792434712278376, guid: 0000000000000000d000000000000000, type: 0} + m_Text: Console + m_Image: {fileID: -4950941429401207979, guid: 0000000000000000d000000000000000, type: 0} m_Tooltip: m_Pos: serializedVersion: 2 - x: 337 - y: 131 - width: 1471 - height: 940 + x: 0 + y: 624 + width: 1155 + height: 151.39996 m_SerializedDataModeController: m_DataMode: 0 m_PreferredDataMode: 0 @@ -59,70 +59,6 @@ MonoBehaviour: m_LastAppliedPresetName: Default m_SaveData: [] m_OverlaysVisible: 1 - m_SerializedViewNames: [] - m_SerializedViewValues: [] - m_PlayModeViewName: GameView - m_ShowGizmos: 0 - m_TargetDisplay: 0 - m_ClearColor: {r: 0, g: 0, b: 0, a: 0} - m_TargetSize: {x: 1920, y: 1200} - m_TextureFilterMode: 0 - m_TextureHideFlags: 61 - m_RenderIMGUI: 1 - m_EnterPlayModeBehavior: 1 - m_UseMipMap: 0 - m_VSyncEnabled: 0 - m_Gizmos: 0 - m_Stats: 0 - m_SelectedSizes: 07000000000000000000000000000000000000000000000000000000000000000000000000000000 - m_ZoomArea: - m_HRangeLocked: 0 - m_VRangeLocked: 0 - hZoomLockedByDefault: 0 - vZoomLockedByDefault: 0 - m_HBaseRangeMin: -960 - m_HBaseRangeMax: 960 - m_VBaseRangeMin: -600 - m_VBaseRangeMax: 600 - m_HAllowExceedBaseRangeMin: 1 - m_HAllowExceedBaseRangeMax: 1 - m_VAllowExceedBaseRangeMin: 1 - m_VAllowExceedBaseRangeMax: 1 - m_ScaleWithWindow: 0 - m_HSlider: 0 - m_VSlider: 0 - m_IgnoreScrollWheelUntilClicked: 0 - m_EnableMouseInput: 1 - m_EnableSliderZoomHorizontal: 0 - m_EnableSliderZoomVertical: 0 - m_UniformScale: 1 - m_UpDirection: 1 - m_DrawArea: - serializedVersion: 2 - x: 0 - y: 21 - width: 1471 - height: 919 - m_Scale: {x: 0.7658333, y: 0.7658333} - m_Translation: {x: 735.5, y: 459.5} - m_MarginLeft: 0 - m_MarginRight: 0 - m_MarginTop: 0 - m_MarginBottom: 0 - m_LastShownAreaInsideMargins: - serializedVersion: 2 - x: -960.3917 - y: -600 - width: 1920.7834 - height: 1200 - m_MinimalGUI: 1 - m_defaultScale: 0.7658333 - m_LastWindowPixelSize: {x: 1471, y: 940} - m_ClearInEditMode: 1 - m_NoCameraWarning: 1 - m_LowResolutionForAspectRatios: 01000000000000000000 - m_XRRenderMode: 0 - m_RenderTexture: {fileID: 0} --- !u!114 &3 MonoBehaviour: m_ObjectHideFlags: 52 @@ -137,17 +73,17 @@ MonoBehaviour: m_EditorClassIdentifier: m_Children: - {fileID: 4} - - {fileID: 9} + - {fileID: 10} m_Position: serializedVersion: 2 x: 0 y: 0 - width: 1810 - height: 1289 + width: 1156 + height: 722.8 m_MinSize: {x: 200, y: 100} m_MaxSize: {x: 16192, y: 16192} vertical: 1 - controlID: 627 + controlID: 39 --- !u!114 &4 MonoBehaviour: m_ObjectHideFlags: 52 @@ -167,12 +103,12 @@ MonoBehaviour: serializedVersion: 2 x: 0 y: 0 - width: 1810 - height: 961 + width: 1156 + height: 550.4 m_MinSize: {x: 200, y: 50} m_MaxSize: {x: 16192, y: 8096} vertical: 0 - controlID: 603 + controlID: 40 --- !u!114 &5 MonoBehaviour: m_ObjectHideFlags: 52 @@ -190,10 +126,10 @@ MonoBehaviour: serializedVersion: 2 x: 0 y: 0 - width: 337 - height: 961 - m_MinSize: {x: 200, y: 200} - m_MaxSize: {x: 4000, y: 4000} + width: 352 + height: 550.4 + m_MinSize: {x: 201, y: 221} + m_MaxSize: {x: 4001, y: 4021} m_ActualView: {fileID: 6} m_Panes: - {fileID: 6} @@ -215,14 +151,14 @@ MonoBehaviour: m_MaxSize: {x: 4000, y: 4000} m_TitleContent: m_Text: Hierarchy - m_Image: {fileID: 7966133145522015247, guid: 0000000000000000d000000000000000, type: 0} + m_Image: {fileID: -3734745235275155857, guid: 0000000000000000d000000000000000, type: 0} m_Tooltip: m_Pos: serializedVersion: 2 x: 0 - y: 131 - width: 336 - height: 940 + y: 73.6 + width: 351 + height: 529.4 m_SerializedDataModeController: m_DataMode: 0 m_PreferredDataMode: 0 @@ -236,9 +172,9 @@ MonoBehaviour: m_SceneHierarchy: m_TreeViewState: scrollPos: {x: 0, y: 0} - m_SelectedIDs: + m_SelectedIDs: 4ad60000 m_LastClickedID: 0 - m_ExpandedIDs: b8b3feffa0b4feff + m_ExpandedIDs: 684cffff3457ffffa064ffffb06effffec71ffffc291ffff56b9ffffacd9ffff84e1ffff0cefffff16fbffffbca60000dcb10000d2b200006cb4000086c4000012ae01004edd0100 m_RenameOverlay: m_UserAcceptedRename: 0 m_Name: @@ -277,16 +213,16 @@ MonoBehaviour: m_Children: [] m_Position: serializedVersion: 2 - x: 337 + x: 352 y: 0 - width: 1473 - height: 961 + width: 804 + height: 550.4 m_MinSize: {x: 202, y: 221} m_MaxSize: {x: 4002, y: 4021} - m_ActualView: {fileID: 2} + m_ActualView: {fileID: 9} m_Panes: - {fileID: 8} - - {fileID: 2} + - {fileID: 9} m_Selected: 1 m_LastSelected: 0 --- !u!114 &8 @@ -305,14 +241,14 @@ MonoBehaviour: m_MaxSize: {x: 4000, y: 4000} m_TitleContent: m_Text: Scene - m_Image: {fileID: 2593428753322112591, guid: 0000000000000000d000000000000000, type: 0} + m_Image: {fileID: 8634526014445323508, guid: 0000000000000000d000000000000000, type: 0} m_Tooltip: m_Pos: serializedVersion: 2 - x: 332.80002 + x: 415.2 y: 73.6 - width: 670 - height: 425.4 + width: 731.60004 + height: 479 m_SerializedDataModeController: m_DataMode: 0 m_PreferredDataMode: 0 @@ -328,7 +264,7 @@ MonoBehaviour: collapsed: 0 displayed: 1 snapOffset: {x: -156, y: -26.400024} - snapOffsetDelta: {x: 0, y: 0} + snapOffsetDelta: {x: -14.400024, y: 0} snapCorner: 3 id: Tool Settings index: 0 @@ -367,7 +303,7 @@ MonoBehaviour: collapsed: 0 displayed: 0 snapOffset: {x: 0, y: 0} - snapOffsetDelta: {x: 0, y: 24.8} + snapOffsetDelta: {x: 0, y: 0} snapCorner: 1 id: unity-search-toolbar index: 1 @@ -419,7 +355,7 @@ MonoBehaviour: collapsed: 0 displayed: 0 snapOffset: {x: 0, y: 0} - snapOffsetDelta: {x: 0, y: 24.8} + snapOffsetDelta: {x: 0, y: 0} snapCorner: 0 id: Scene View/Light Settings index: 2 @@ -445,7 +381,7 @@ MonoBehaviour: collapsed: 0 displayed: 0 snapOffset: {x: 0, y: 0} - snapOffsetDelta: {x: 0, y: 24.8} + snapOffsetDelta: {x: 0, y: 0} snapCorner: 0 id: Scene View/Cloth Constraints index: 3 @@ -458,7 +394,7 @@ MonoBehaviour: collapsed: 0 displayed: 0 snapOffset: {x: 0, y: 0} - snapOffsetDelta: {x: 0, y: 24.8} + snapOffsetDelta: {x: 0, y: 0} snapCorner: 0 id: Scene View/Cloth Collisions index: 4 @@ -510,7 +446,7 @@ MonoBehaviour: collapsed: 0 displayed: 0 snapOffset: {x: 0, y: 0} - snapOffsetDelta: {x: 0, y: 24.8} + snapOffsetDelta: {x: 0, y: 0} snapCorner: 0 id: Scene View/Occlusion Culling index: 5 @@ -523,7 +459,7 @@ MonoBehaviour: collapsed: 0 displayed: 0 snapOffset: {x: 0, y: 0} - snapOffsetDelta: {x: 0, y: 24.8} + snapOffsetDelta: {x: 0, y: 0} snapCorner: 0 id: Scene View/Physics Debugger index: 6 @@ -536,7 +472,7 @@ MonoBehaviour: collapsed: 0 displayed: 0 snapOffset: {x: 0, y: 0} - snapOffsetDelta: {x: 0, y: 24.8} + snapOffsetDelta: {x: 0, y: 0} snapCorner: 0 id: Scene View/Scene Visibility index: 7 @@ -549,7 +485,7 @@ MonoBehaviour: collapsed: 0 displayed: 0 snapOffset: {x: 0, y: 0} - snapOffsetDelta: {x: 0, y: 24.8} + snapOffsetDelta: {x: 0, y: 0} snapCorner: 0 id: Scene View/Particles index: 8 @@ -658,9 +594,9 @@ MonoBehaviour: m_PlayAudio: 0 m_AudioPlay: 0 m_Position: - m_Target: {x: -1.6429672, y: 1.0992794, z: -0.007348313} + m_Target: {x: 1273.6833, y: 290.22214, z: -1.1335483} speed: 2 - m_Value: {x: -1.6429672, y: 1.0992794, z: -0.007348313} + m_Value: {x: 1273.6833, y: 290.22214, z: -1.1335483} m_RenderMode: 0 m_CameraMode: drawMode: 0 @@ -710,9 +646,9 @@ MonoBehaviour: speed: 2 m_Value: {x: 0, y: 0, z: 0, w: 1} m_Size: - m_Target: 1.6008571 + m_Target: 1440.6256 speed: 2 - m_Value: 1.6008571 + m_Value: 1440.6256 m_Ortho: m_Target: 1 speed: 2 @@ -738,6 +674,104 @@ MonoBehaviour: m_LastLockedObject: {fileID: 0} m_ViewIsLockedToObject: 0 --- !u!114 &9 +MonoBehaviour: + m_ObjectHideFlags: 52 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 1 + m_Script: {fileID: 12015, guid: 0000000000000000e000000000000000, type: 0} + m_Name: + m_EditorClassIdentifier: + m_MinSize: {x: 200, y: 200} + m_MaxSize: {x: 4000, y: 4000} + m_TitleContent: + m_Text: Game + m_Image: {fileID: 4621777727084837110, guid: 0000000000000000d000000000000000, type: 0} + m_Tooltip: + m_Pos: + serializedVersion: 2 + x: 352 + y: 73.6 + width: 802 + height: 529.4 + m_SerializedDataModeController: + m_DataMode: 0 + m_PreferredDataMode: 0 + m_SupportedDataModes: + isAutomatic: 1 + m_ViewDataDictionary: {fileID: 0} + m_OverlayCanvas: + m_LastAppliedPresetName: Default + m_SaveData: [] + m_OverlaysVisible: 1 + m_SerializedViewNames: [] + m_SerializedViewValues: [] + m_PlayModeViewName: GameView + m_ShowGizmos: 0 + m_TargetDisplay: 0 + m_ClearColor: {r: 0, g: 0, b: 0, a: 0} + m_TargetSize: {x: 1002.5, y: 635.5} + m_TextureFilterMode: 0 + m_TextureHideFlags: 61 + m_RenderIMGUI: 1 + m_EnterPlayModeBehavior: 0 + m_UseMipMap: 0 + m_VSyncEnabled: 0 + m_Gizmos: 0 + m_Stats: 0 + m_SelectedSizes: 07000000000000000000000000000000000000000000000000000000000000000000000000000000 + m_ZoomArea: + m_HRangeLocked: 0 + m_VRangeLocked: 0 + hZoomLockedByDefault: 0 + vZoomLockedByDefault: 0 + m_HBaseRangeMin: -401 + m_HBaseRangeMax: 401 + m_VBaseRangeMin: -254.2 + m_VBaseRangeMax: 254.2 + m_HAllowExceedBaseRangeMin: 1 + m_HAllowExceedBaseRangeMax: 1 + m_VAllowExceedBaseRangeMin: 1 + m_VAllowExceedBaseRangeMax: 1 + m_ScaleWithWindow: 0 + m_HSlider: 0 + m_VSlider: 0 + m_IgnoreScrollWheelUntilClicked: 0 + m_EnableMouseInput: 0 + m_EnableSliderZoomHorizontal: 0 + m_EnableSliderZoomVertical: 0 + m_UniformScale: 1 + m_UpDirection: 1 + m_DrawArea: + serializedVersion: 2 + x: 0 + y: 21 + width: 802 + height: 508.40002 + m_Scale: {x: 1, y: 1} + m_Translation: {x: 401, y: 254.20001} + m_MarginLeft: 0 + m_MarginRight: 0 + m_MarginTop: 0 + m_MarginBottom: 0 + m_LastShownAreaInsideMargins: + serializedVersion: 2 + x: -401 + y: -254.20001 + width: 802 + height: 508.40002 + m_MinimalGUI: 1 + m_defaultScale: 1 + m_LastWindowPixelSize: {x: 1002.5, y: 661.75} + m_ClearInEditMode: 1 + m_NoCameraWarning: 1 + m_LowResolutionForAspectRatios: 01000000000000000000 + m_XRRenderMode: 0 + m_RenderTexture: {fileID: 0} +--- !u!114 &10 MonoBehaviour: m_ObjectHideFlags: 52 m_CorrespondingSourceObject: {fileID: 0} @@ -747,24 +781,24 @@ MonoBehaviour: m_Enabled: 1 m_EditorHideFlags: 1 m_Script: {fileID: 12006, guid: 0000000000000000e000000000000000, type: 0} - m_Name: ProjectBrowser + m_Name: ConsoleWindow m_EditorClassIdentifier: m_Children: [] m_Position: serializedVersion: 2 x: 0 - y: 961 - width: 1810 - height: 328 - m_MinSize: {x: 230, y: 250} - m_MaxSize: {x: 10000, y: 10000} - m_ActualView: {fileID: 10} + y: 550.4 + width: 1156 + height: 172.39996 + m_MinSize: {x: 101, y: 121} + m_MaxSize: {x: 4001, y: 4021} + m_ActualView: {fileID: 2} m_Panes: - - {fileID: 10} - {fileID: 11} - m_Selected: 0 - m_LastSelected: 1 ---- !u!114 &10 + - {fileID: 2} + m_Selected: 1 + m_LastSelected: 0 +--- !u!114 &11 MonoBehaviour: m_ObjectHideFlags: 52 m_CorrespondingSourceObject: {fileID: 0} @@ -780,14 +814,14 @@ MonoBehaviour: m_MaxSize: {x: 10000, y: 10000} m_TitleContent: m_Text: Project - m_Image: {fileID: -5467254957812901981, guid: 0000000000000000d000000000000000, type: 0} + m_Image: {fileID: -5179483145760003458, guid: 0000000000000000d000000000000000, type: 0} m_Tooltip: m_Pos: serializedVersion: 2 x: 0 - y: 1092 - width: 1809 - height: 307 + y: 624 + width: 1155 + height: 151.39996 m_SerializedDataModeController: m_DataMode: 0 m_PreferredDataMode: 0 @@ -819,14 +853,14 @@ MonoBehaviour: m_LastFolders: - Assets/Scenes m_LastFoldersGridSize: -1 - m_LastProjectPath: "/home/loizbek/Syst\xE8me/_Code/_Travail/evalulu" + m_LastProjectPath: C:\Users\guill\OneDrive\Bureau\LUCIOLE\EVALULULU_DEC2023_2\lulu-testing m_LockTracker: m_IsLocked: 0 m_FolderTreeState: scrollPos: {x: 0, y: 79} - m_SelectedIDs: 8c410000 - m_LastClickedID: 16780 - m_ExpandedIDs: 00000000d040000000ca9a3bffffff7f + m_SelectedIDs: 407c0000 + m_LastClickedID: 31808 + m_ExpandedIDs: 00000000227c0000247c000000ca9a3bffffff7f m_RenameOverlay: m_UserAcceptedRename: 0 m_Name: @@ -842,7 +876,7 @@ MonoBehaviour: m_IsRenaming: 0 m_OriginalEventType: 11 m_IsRenamingFilename: 1 - m_ClientGUIView: {fileID: 9} + m_ClientGUIView: {fileID: 10} m_SearchString: m_CreateAssetUtility: m_EndAction: {fileID: 0} @@ -854,7 +888,7 @@ MonoBehaviour: scrollPos: {x: 0, y: 0} m_SelectedIDs: m_LastClickedID: 0 - m_ExpandedIDs: 00000000d040000000ca9a3bffffff7f + m_ExpandedIDs: 00000000227c0000247c0000267c0000 m_RenameOverlay: m_UserAcceptedRename: 0 m_Name: @@ -879,9 +913,9 @@ MonoBehaviour: m_Icon: {fileID: 0} m_ResourceFile: m_ListAreaState: - m_SelectedInstanceIDs: 0ace0000 - m_LastClickedInstanceID: 52746 - m_HadKeyboardFocusLastEvent: 0 + m_SelectedInstanceIDs: 4ad60000 + m_LastClickedInstanceID: 54858 + m_HadKeyboardFocusLastEvent: 1 m_ExpandedInstanceIDs: c6230000 m_RenameOverlay: m_UserAcceptedRename: 0 @@ -898,7 +932,7 @@ MonoBehaviour: m_IsRenaming: 0 m_OriginalEventType: 11 m_IsRenamingFilename: 1 - m_ClientGUIView: {fileID: 9} + m_ClientGUIView: {fileID: 10} m_CreateAssetUtility: m_EndAction: {fileID: 0} m_InstanceID: 0 @@ -910,40 +944,6 @@ MonoBehaviour: m_GridSize: 64 m_SkipHiddenPackages: 0 m_DirectoriesAreaWidth: 184.2 ---- !u!114 &11 -MonoBehaviour: - m_ObjectHideFlags: 52 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 0} - m_Enabled: 1 - m_EditorHideFlags: 1 - m_Script: {fileID: 12003, guid: 0000000000000000e000000000000000, type: 0} - m_Name: - m_EditorClassIdentifier: - m_MinSize: {x: 100, y: 100} - m_MaxSize: {x: 4000, y: 4000} - m_TitleContent: - m_Text: Console - m_Image: {fileID: -4327648978806127646, guid: 0000000000000000d000000000000000, type: 0} - m_Tooltip: - m_Pos: - serializedVersion: 2 - x: 0 - y: 1092 - width: 1809 - height: 307 - m_SerializedDataModeController: - m_DataMode: 0 - m_PreferredDataMode: 0 - m_SupportedDataModes: - isAutomatic: 1 - m_ViewDataDictionary: {fileID: 0} - m_OverlayCanvas: - m_LastAppliedPresetName: Default - m_SaveData: [] - m_OverlaysVisible: 1 --- !u!114 &12 MonoBehaviour: m_ObjectHideFlags: 52 @@ -959,12 +959,12 @@ MonoBehaviour: m_Children: [] m_Position: serializedVersion: 2 - x: 1810 + x: 1156 y: 0 - width: 750 - height: 1289 - m_MinSize: {x: 275, y: 50} - m_MaxSize: {x: 4000, y: 4000} + width: 380 + height: 722.8 + m_MinSize: {x: 276, y: 71} + m_MaxSize: {x: 4001, y: 4021} m_ActualView: {fileID: 13} m_Panes: - {fileID: 13} @@ -986,14 +986,14 @@ MonoBehaviour: m_MaxSize: {x: 4000, y: 4000} m_TitleContent: m_Text: Inspector - m_Image: {fileID: -2667387946076563598, guid: 0000000000000000d000000000000000, type: 0} + m_Image: {fileID: -440750813802333266, guid: 0000000000000000d000000000000000, type: 0} m_Tooltip: m_Pos: serializedVersion: 2 - x: 1810 - y: 131 - width: 749 - height: 1268 + x: 1156 + y: 73.6 + width: 379 + height: 701.8 m_SerializedDataModeController: m_DataMode: 0 m_PreferredDataMode: 0 @@ -1010,7 +1010,7 @@ MonoBehaviour: m_CachedPref: 160 m_ControlHash: -371814159 m_PrefName: Preview_InspectorPreview - m_LastInspectedObjectInstanceID: 52746 + m_LastInspectedObjectInstanceID: -1 m_LastVerticalScrollValue: 0 m_GlobalObjectId: m_InspectorMode: 0 diff --git a/UserSettings/Layouts/default-2022.dwlt b/UserSettings/Layouts/default-2022.dwlt index 56f4a54a6c2c618ce84c126394036596c5f52218..48be7dbe90eee5b4b0f62a47bd91a34348304ce0 100644 --- a/UserSettings/Layouts/default-2022.dwlt +++ b/UserSettings/Layouts/default-2022.dwlt @@ -119,7 +119,7 @@ MonoBehaviour: m_MinSize: {x: 300, y: 100} m_MaxSize: {x: 24288, y: 16192} vertical: 0 - controlID: 99 + controlID: 122 --- !u!114 &6 MonoBehaviour: m_ObjectHideFlags: 52 @@ -139,12 +139,12 @@ MonoBehaviour: serializedVersion: 2 x: 0 y: 0 - width: 1052.8 + width: 1431.2 height: 722.8 m_MinSize: {x: 200, y: 100} m_MaxSize: {x: 16192, y: 16192} vertical: 1 - controlID: 39 + controlID: 41 --- !u!114 &7 MonoBehaviour: m_ObjectHideFlags: 52 @@ -164,12 +164,12 @@ MonoBehaviour: serializedVersion: 2 x: 0 y: 0 - width: 1052.8 - height: 304.8 + width: 1431.2 + height: 402.4 m_MinSize: {x: 200, y: 50} m_MaxSize: {x: 16192, y: 8096} vertical: 0 - controlID: 40 + controlID: 42 --- !u!114 &8 MonoBehaviour: m_ObjectHideFlags: 52 @@ -187,10 +187,10 @@ MonoBehaviour: serializedVersion: 2 x: 0 y: 0 - width: 350.4 - height: 304.8 - m_MinSize: {x: 200, y: 200} - m_MaxSize: {x: 4000, y: 4000} + width: 388 + height: 402.4 + m_MinSize: {x: 201, y: 221} + m_MaxSize: {x: 4001, y: 4021} m_ActualView: {fileID: 13} m_Panes: - {fileID: 13} @@ -206,23 +206,23 @@ MonoBehaviour: m_Enabled: 1 m_EditorHideFlags: 1 m_Script: {fileID: 12006, guid: 0000000000000000e000000000000000, type: 0} - m_Name: GameView + m_Name: SceneView m_EditorClassIdentifier: m_Children: [] m_Position: serializedVersion: 2 - x: 350.4 + x: 388 y: 0 - width: 702.4 - height: 304.8 - m_MinSize: {x: 200, y: 200} - m_MaxSize: {x: 4000, y: 4000} - m_ActualView: {fileID: 12} + width: 1043.2 + height: 402.4 + m_MinSize: {x: 202, y: 221} + m_MaxSize: {x: 4002, y: 4021} + m_ActualView: {fileID: 14} m_Panes: - {fileID: 14} - {fileID: 12} - m_Selected: 1 - m_LastSelected: 0 + m_Selected: 0 + m_LastSelected: 1 --- !u!114 &10 MonoBehaviour: m_ObjectHideFlags: 52 @@ -239,9 +239,9 @@ MonoBehaviour: m_Position: serializedVersion: 2 x: 0 - y: 304.8 - width: 1052.8 - height: 418 + y: 402.4 + width: 1431.2 + height: 320.4 m_MinSize: {x: 231, y: 271} m_MaxSize: {x: 10001, y: 10021} m_ActualView: {fileID: 15} @@ -265,12 +265,12 @@ MonoBehaviour: m_Children: [] m_Position: serializedVersion: 2 - x: 1052.8 + x: 1431.2 y: 0 - width: 483.19995 + width: 104.80005 height: 722.8 - m_MinSize: {x: 275, y: 50} - m_MaxSize: {x: 4000, y: 4000} + m_MinSize: {x: 276, y: 71} + m_MaxSize: {x: 4001, y: 4021} m_ActualView: {fileID: 17} m_Panes: - {fileID: 17} @@ -296,10 +296,10 @@ MonoBehaviour: m_Tooltip: m_Pos: serializedVersion: 2 - x: 350.4 + x: 388 y: 73.6 - width: 700.4 - height: 283.8 + width: 1041.2 + height: 381.4 m_SerializedDataModeController: m_DataMode: 0 m_PreferredDataMode: 0 @@ -316,7 +316,7 @@ MonoBehaviour: m_ShowGizmos: 0 m_TargetDisplay: 0 m_ClearColor: {r: 0, g: 0, b: 0, a: 0} - m_TargetSize: {x: 875.5, y: 328.5} + m_TargetSize: {x: 1301.5, y: 450.5} m_TextureFilterMode: 0 m_TextureHideFlags: 61 m_RenderIMGUI: 1 @@ -331,10 +331,10 @@ MonoBehaviour: m_VRangeLocked: 0 hZoomLockedByDefault: 0 vZoomLockedByDefault: 0 - m_HBaseRangeMin: -350.2 - m_HBaseRangeMax: 350.2 - m_VBaseRangeMin: -131.40001 - m_VBaseRangeMax: 131.40001 + m_HBaseRangeMin: -520.60004 + m_HBaseRangeMax: 520.60004 + m_VBaseRangeMin: -180.2 + m_VBaseRangeMax: 180.2 m_HAllowExceedBaseRangeMin: 1 m_HAllowExceedBaseRangeMax: 1 m_VAllowExceedBaseRangeMin: 1 @@ -343,7 +343,7 @@ MonoBehaviour: m_HSlider: 0 m_VSlider: 0 m_IgnoreScrollWheelUntilClicked: 0 - m_EnableMouseInput: 1 + m_EnableMouseInput: 0 m_EnableSliderZoomHorizontal: 0 m_EnableSliderZoomVertical: 0 m_UniformScale: 1 @@ -352,23 +352,23 @@ MonoBehaviour: serializedVersion: 2 x: 0 y: 21 - width: 700.4 - height: 262.8 - m_Scale: {x: 0.99999994, y: 0.9999999} - m_Translation: {x: 350.2, y: 131.4} + width: 1041.2 + height: 360.4 + m_Scale: {x: 0.9999999, y: 0.99999994} + m_Translation: {x: 520.6, y: 180.2} m_MarginLeft: 0 m_MarginRight: 0 m_MarginTop: 0 m_MarginBottom: 0 m_LastShownAreaInsideMargins: serializedVersion: 2 - x: -350.20004 - y: -131.40001 - width: 700.4001 - height: 262.80002 + x: -520.60004 + y: -180.20001 + width: 1041.2001 + height: 360.40002 m_MinimalGUI: 1 m_defaultScale: 0.9999999 - m_LastWindowPixelSize: {x: 875.5, y: 354.75} + m_LastWindowPixelSize: {x: 1301.5, y: 476.75} m_ClearInEditMode: 1 m_NoCameraWarning: 1 m_LowResolutionForAspectRatios: 01000000000000000000 @@ -396,8 +396,8 @@ MonoBehaviour: serializedVersion: 2 x: 0 y: 73.6 - width: 349.4 - height: 283.8 + width: 387 + height: 381.4 m_SerializedDataModeController: m_DataMode: 0 m_PreferredDataMode: 0 @@ -411,9 +411,9 @@ MonoBehaviour: m_SceneHierarchy: m_TreeViewState: scrollPos: {x: 0, y: 0} - m_SelectedIDs: 7e7c0000 + m_SelectedIDs: m_LastClickedID: 0 - m_ExpandedIDs: acf0ffff10f4ffff16fbffffec6200006aa60000 + m_ExpandedIDs: 9af4f9ffdef4f9ff6c15faff9e17faffb217faffd070faff4e77faff3078faffd27cfaff167dfaffd09efaff30a2faff4ca2faff9890fbff38b1fbff5206fcff0429fcffde2ffcffda97fcff1e98fcffacb8fcffdebafcfff2bafcfff41afdff245bfdffe8e2fdff1ce9fdff60e9fdff1a0bfeff7a0efeff960efeff0610feffa63dfeffa864feff9680feff4290feffaa2cffffd835ffff48daffff04fbffff389c0000849c00008e9c0000989c0000aa9c0000c2c5010038c6010028800300269e0300fc8b0400008c0400768c04007821080026810900b0810900c8840900f28f0900849009003a9c09003e9c0900989c0900b49c090080f70900faf70900f4100b00062e0b00 m_RenameOverlay: m_UserAcceptedRename: 0 m_Name: @@ -457,10 +457,10 @@ MonoBehaviour: m_Tooltip: m_Pos: serializedVersion: 2 - x: 672 - y: 131 - width: 1328 - height: 1005 + x: 388 + y: 73.6 + width: 1041.2 + height: 381.4 m_SerializedDataModeController: m_DataMode: 0 m_PreferredDataMode: 0 @@ -476,7 +476,7 @@ MonoBehaviour: collapsed: 0 displayed: 1 snapOffset: {x: -156, y: -26.400024} - snapOffsetDelta: {x: -15, y: 0} + snapOffsetDelta: {x: -14.400024, y: 0} snapCorner: 3 id: Tool Settings index: 0 @@ -806,9 +806,9 @@ MonoBehaviour: m_PlayAudio: 0 m_AudioPlay: 0 m_Position: - m_Target: {x: 8.242814, y: 5.4317126, z: -0.21880572} + m_Target: {x: 620.1211, y: 334.8517, z: 1.8107476} speed: 2 - m_Value: {x: 8.242814, y: 5.4317126, z: -0.21880572} + m_Value: {x: 620.1211, y: 334.8517, z: 1.8107476} m_RenderMode: 0 m_CameraMode: drawMode: 0 @@ -858,9 +858,9 @@ MonoBehaviour: speed: 2 m_Value: {x: 0, y: 0, z: 0, w: 1} m_Size: - m_Target: 23.37879 + m_Target: 372.46674 speed: 2 - m_Value: 23.37879 + m_Value: 372.46674 m_Ortho: m_Target: 1 speed: 2 @@ -906,9 +906,9 @@ MonoBehaviour: m_Pos: serializedVersion: 2 x: 0 - y: 378.4 - width: 1051.8 - height: 397 + y: 476 + width: 1430.2 + height: 299.4 m_SerializedDataModeController: m_DataMode: 0 m_PreferredDataMode: 0 @@ -930,7 +930,7 @@ MonoBehaviour: m_SkipHidden: 0 m_SearchArea: 1 m_Folders: - - Assets/Scenes + - Assets m_Globs: [] m_OriginalText: m_ImportLogFlags: 0 @@ -938,16 +938,16 @@ MonoBehaviour: m_ViewMode: 1 m_StartGridSize: 64 m_LastFolders: - - Assets/Scenes + - Assets m_LastFoldersGridSize: -1 m_LastProjectPath: C:\Users\guill\OneDrive\Bureau\LUCIOLE\EVALULULU_DEC2023_2\lulu-testing m_LockTracker: m_IsLocked: 0 m_FolderTreeState: scrollPos: {x: 0, y: 79} - m_SelectedIDs: 347c0000 - m_LastClickedID: 31796 - m_ExpandedIDs: 000000001e7c0000207c0000227c000000ca9a3bffffff7f + m_SelectedIDs: ba9b0000 + m_LastClickedID: 39866 + m_ExpandedIDs: 00000000ba9b0000bc9b0000be9b000000ca9a3bffffff7f m_RenameOverlay: m_UserAcceptedRename: 0 m_Name: @@ -975,7 +975,7 @@ MonoBehaviour: scrollPos: {x: 0, y: 0} m_SelectedIDs: m_LastClickedID: 0 - m_ExpandedIDs: 000000001e7c0000207c0000227c0000 + m_ExpandedIDs: 00000000ba9b0000bc9b0000be9b0000 m_RenameOverlay: m_UserAcceptedRename: 0 m_Name: @@ -1002,7 +1002,7 @@ MonoBehaviour: m_ListAreaState: m_SelectedInstanceIDs: m_LastClickedInstanceID: 0 - m_HadKeyboardFocusLastEvent: 1 + m_HadKeyboardFocusLastEvent: 0 m_ExpandedInstanceIDs: c6230000 m_RenameOverlay: m_UserAcceptedRename: 0 @@ -1052,9 +1052,9 @@ MonoBehaviour: m_Pos: serializedVersion: 2 x: 0 - y: 642.4 - width: 1051.8 - height: 133 + y: 476 + width: 1430.2 + height: 299.4 m_SerializedDataModeController: m_DataMode: 0 m_PreferredDataMode: 0 @@ -1085,9 +1085,9 @@ MonoBehaviour: m_Tooltip: m_Pos: serializedVersion: 2 - x: 1052.8 + x: 1431.2001 y: 73.6 - width: 482.19995 + width: 103.80005 height: 701.8 m_SerializedDataModeController: m_DataMode: 0