Version: 2021.1
言語: 日本語
Method group is Obsolete

WWW.textureNonReadable

マニュアルに切り替える
Obsolete public Texture2D textureNonReadable ;

説明

ダウンロードしたデータからピクセルデータの読み込みができない Texture2D を生成し返します(読み取り専用)

texture と同じですが読み込み不可で、システムメモリを効果的に解放します。

See Also: TextureImporter.isReadable.

// Get the latest webcam shot from outside "Friday's" in Times Square

using UnityEngine; using System.Collections;

public class ExampleClass : MonoBehaviour { public string url = "https://images.earthcam.com/ec_metros/ourcams/fridays.jpg"; IEnumerator Start() { // Start a download of the given URL using (WWW www = new WWW(url)) { // Wait for download to complete yield return www;

// assign texture Renderer renderer = GetComponent<Renderer>(); renderer.material.mainTexture = www.textureNonReadable; } } }