Version: 2022.1

DownloadHandlerBufferConstructor

切换到手册
public DownloadHandlerBuffer ();

描述

默认构造函数。

using System.Collections;
using UnityEngine;
using UnityEngine.Networking;

public class Example : MonoBehaviour { IEnumerator Start() { using (var uwr = new UnityWebRequest("https://unity3d.com/", UnityWebRequest.kHttpVerbGET)) { uwr.downloadHandler = new DownloadHandlerBuffer(); yield return uwr.SendWebRequest(); Debug.Log(uwr.downloadHandler.text); } } }