21 lines
536 B
C#
21 lines
536 B
C#
|
using System.Collections;
|
||
|
using System.Collections.Generic;
|
||
|
using UnityEngine;
|
||
|
using Sirenix.OdinInspector;
|
||
|
using UnityEngine.Networking;
|
||
|
using Cysharp.Threading.Tasks;
|
||
|
namespace BITKit
|
||
|
{
|
||
|
public class UnityWebRequestGetAsync : BITBehavior
|
||
|
{
|
||
|
public string url;
|
||
|
[TextArea] public string result;
|
||
|
[Button]
|
||
|
async void Excute()
|
||
|
{
|
||
|
var request = UnityWebRequest.Get(url);
|
||
|
await request.SendWebRequest();
|
||
|
result = request.downloadHandler.text;
|
||
|
}
|
||
|
}
|
||
|
}
|