/// <summary> /// Demarre le service de transfert de fichier /// </summary> public void StartFileTransferService() { IpConfiguratorTriggers ipConfiguratorTriggers = ipConfigurator.GetComponent <IpConfiguratorTriggers>(); AudioSource audio = startAppButton.GetComponent <AudioSource>(); if (!ipConfiguratorTriggers.IsLoaded()) { audio.Play(); Debug.Log("Ip config not loaded !!!"); return; } string host = ipConfiguratorTriggers.GetIpAdress(); string port = ipConfiguratorTriggers.GetPort(); ReceiveAndWriteFile.Instance.SetupHostAndPort(host, port); fileTransferStarted = true; }
/// <summary> /// Démarre l'application /// </summary> public void StartApp() { IpConfiguratorTriggers ipConfiguratorTriggers = ipConfigurator.GetComponent <IpConfiguratorTriggers>(); AudioSource audio = startAppButton.GetComponent <AudioSource>(); if (!ipConfiguratorTriggers.IsLoaded()) { audio.Play(); Debug.Log("Ip config not loaded !!!"); return; } if (!fileTransferStarted) { audio.Play(); Debug.Log("File transfer not started"); return; } string host = ipConfiguratorTriggers.GetIpAdress(); string port = ipConfiguratorTriggers.GetPort(); if (ReceiveAndWriteFile.Instance.CheckIfSameAdress(host, port)) { audio.Play(); Debug.Log("Adress must be different"); return; } HideStartMenu(); PlStreamCustom.Instance.StartPlStreamCustom(host, port); if (enableAutomaticCalibration) { gltf.SetActive(false); axisViewer.SetActive(false); calibrationCubes.SetActive(true); // -> Les autres éléments sont affiché après le calibrage } else { // Si on n'utilise pas le calibrage automatique, on gltf.SetActive(true); axisViewer.SetActive(true); } }