Documentation

Unity Engine


User Manual

Script Reference

Unity Engine


textureNonReadable

Returns a non-readable Texture2D generated from the downloaded data (Read Only).
Read time 1 minuteLast updated 4 days ago

Definition

  • Type: Property
  • Namespace: UnityEngine
  • Assembly: UnityEngine.UnityWebRequestWWWModule
Warning
Deprecated. Use UnityWebRequest, a fully featured replacement which is more efficient and has additional features
public Texture2D textureNonReadable { get; }

Remarks

Same as _texture, but marks texture as non-readable, effectively freeing system memory.
Additional Resources: _isReadable

Examples

// Get the latest webcam shot from outside "Friday's" in Times Squareusing 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; } }}