Version: 2017.1

WWW.textureNonReadable

Cambiar al Manual
public Texture2D textureNonReadable ;

Descripción

Retorna una Texture2D no leíble generada desde los datos descargados (Lectura Solamente).

Lo mismo que texture, pero marca la textura como no-leíble, efectivamente librando memoria del sistema.

Mirar también 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 = "http://images.earthcam.com/ec_metros/ourcams/fridays.jpg"; IEnumerator Start() { // Start a download of the given URL WWW www = new WWW(url);

// Wait for download to complete yield return www;

// assign texture Renderer renderer = GetComponent<Renderer>(); renderer.material.mainTexture = www.textureNonReadable; } }
Copyright © 2023 Unity Technologies
优美缔软件(上海)有限公司 版权所有
"Unity"、Unity 徽标及其他 Unity 商标是 Unity Technologies 或其附属机构在美国及其他地区的商标或注册商标。其他名称或品牌是其各自所有者的商标。
公安部备案号:
31010902002961