private void Start() { webCommunicationSystem = WebCommunicationSystem.GetInstance(); button.onClick.AddListener(UpLoadScore); #if UNITY_STANDALONE if (LoginInformation.ExpId == string.Empty && LoginInformation.EId == string.Empty) { //整个实验中只登陆一次即可,不要重复登陆 webCommunicationSystem.LoginForCloud(Listen); } #endif }
private void Awake() { instance = this; switch (platform) { case PlatformSelect.NormalPlatform: webInterURLs.Add(WebInterType.PCClientLogin, normalPlatformHostURL + "/outer/login"); webInterURLs.Add(WebInterType.CloudLogin, normalPlatformHostURL + "/outer/getMessageByToken"); webInterURLs.Add(WebInterType.UpLoadScore, normalPlatformHostURL + "/outer/intelligent/!expScoreSave"); webInterURLs.Add(WebInterType.UpLoadTable, normalPlatformHostURL + "/outer/report/!reportEdit"); break; case PlatformSelect.SimplePlatform: webInterURLs.Add(WebInterType.CloudLogin, simplePlatformHostURL + "/" + "openapi/" + simplePlatformHostID); break; default: break; } #if UNITY_STANDALONE string[] args = Environment.GetCommandLineArgs(); for (int i = 0; i < args.Length; i++) { switch (platform) { case PlatformSelect.NormalPlatform: if (args[i].StartsWith("token")) { cloudKeyCode = args[i].Split('=')[1]; } break; case PlatformSelect.SimplePlatform: if (args[i].StartsWith("sequenceCode")) { cloudKeyCode = args[i].Split('=')[1]; } break; default: break; } } #endif }