Exemplo n.º 1
0
        public static string Get(string url, string title, string operation)
        {
            UnityWebRequest request = ServerControllerBase.GetRequest(url);

            if (!ProcessRequest(request, title, operation))
            {
                return("");
            }

            return(request.downloadHandler.text);
        }
Exemplo n.º 2
0
        public static TReturnType Get <TReturnType>(string url, string title, string operation)
        {
            UnityWebRequest request = ServerControllerBase.GetRequest(url);

            if (!ProcessRequest(request, title, operation))
            {
                return(default(TReturnType));
            }

            return(JsonConvert.DeserializeObject <TReturnType>(request.downloadHandler.text));
        }