Version: 2020.2
언어: 한국어

DownloadHandlerTextureConstructor

매뉴얼로 전환
public DownloadHandlerTexture ();

설명

Default constructor.

Convenience constructor. Assumes the value of readable is false. The Texture returned by texture will not have its texture data accessible from script.

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

public class Example : MonoBehaviour { IEnumerator Start() { using (var uwr = new UnityWebRequest("https://website.com/image.jpg", UnityWebRequest.kHttpVerbGET)) { uwr.downloadHandler = new DownloadHandlerTexture(); yield return uwr.SendWebRequest(); GetComponent<Renderer>().material.mainTexture = DownloadHandlerTexture.GetContent(uwr); } } }

public DownloadHandlerTexture (bool readable);

파라미터

readable Value to set for TextureImporter.isReadable.

설명

Constructor, allows TextureImporter.isReadable property to be set.

The value in readable will be used to set the TextureImporter.isReadable property when importing the downloaded texture data.