12345678910111213141516171819202122232425262728293031323334 |
- using Newtonsoft.Json.Linq;
- using System.Collections;
- using System.Collections.Generic;
- using TMPro;
- using UnityEngine;
- public class TestCreateRoom : MonoBehaviour
- {
-
- // Start is called before the first frame update
- void Start()
- {
- // Debug.Log("AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA");
- StartCoroutine(HttpTool.Instance.SendHttp("/cmcc-endustry/v1/rtc/createRoom", "", message =>
- {
- JObject jobject = JObject.Parse(message);
- Debug.Log("DGJ ===> CreateRoom " + message);
- // "Request Timeout"
- if (jobject["code"].ToString() == "200" && !string.IsNullOrWhiteSpace(jobject["data"].ToString()))
- {
- Debug.LogError("DGJ === RoomID " + jobject["data"]["roomId"]);
- UILogManager.Instance.logText.text = jobject["data"]["roomId"].ToString();
- GHZRTCFusionManager.Instance.CreateRoom(jobject["data"]["host"].ToString(), jobject["data"]["token"].ToString());
- }
- else if (jobject["code"].ToString() == "503")
- {
- }
- }, "application/x-www-form-urlencoded"));
- }
-
- }
|