コード例 #1
0
ファイル: HomePage.cs プロジェクト: lkottler/VR-Commencement
 public void SpawnPlayer()
 {
     //GameObject generatedPlayer = Instantiate(player, new Vector3(-149.5f, 126.215f, 262.58f), Quaternion.identity);
     //generatedPlayer.transform.localScale = new Vector3(3, 3, 3);
     //SceneManager.LoadScene(0);
     QuickSpawnController.guestStart();
 }
コード例 #2
0
    IEnumerator Register()
    {
        Debug.Log("Attempting to Register");
        WWWForm form = new WWWForm();

        //I want to update the field of current user with texture
        form.AddField("name", UserStats.getUsername());
        form.AddField("password", UserStats.getPassword());
        form.AddField("texture", UserStats.getTexture());
        string url = "http://pages.cs.wisc.edu/~lkottler/commencement/register"; //TODO

        Debug.Log("Database updating started");
        regSuccess = true;
        using (UnityWebRequest webRequest = UnityWebRequest.Post(url, form))//FIXME, change this to update, or delete before this action
        {
            yield return(webRequest.SendWebRequest());

            Debug.Log("Database update returned");
            if (webRequest.downloadHandler.text[0] == '0')
            {
                regSuccess = true;
                QuickSpawnController.guestStart();
                Debug.Log("update avatar worked");
            }
            else
            {
                regSuccess = false;
                Debug.Log("Update avatar failed. Error #" + webRequest.downloadHandler.text);
            }
        }
    }