Version: 2021.3
언어: 한국어
Method group is Obsolete

WWW.textureNonReadable

매뉴얼로 전환
Obsolete public Texture2D textureNonReadable ;

설명

Returns a non-readable Texture2D generated from the downloaded data (Read Only).

Same as texture, but marks texture as non-readable, effectively freeing system memory.

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; } } }
Copyright © 2023 Unity Technologies
优美缔软件(上海)有限公司 版权所有
"Unity"、Unity 徽标及其他 Unity 商标是 Unity Technologies 或其附属机构在美国及其他地区的商标或注册商标。其他名称或品牌是其各自所有者的商标。
公安部备案号:
31010902002961