Legacy Documentation: Version 4.5.0

Script language:

  • JS
  • C#
  • Boo
Script language

Select your preferred scripting language. All code snippets will be displayed in this language.

TextureImporter.isReadable

var isReadable: bool;
bool isReadable;
isReadable as bool

Description

Is texture data readable from scripts.

Texture has to be set as "readable" in order for Texture2D.GetPixel, Texture2D.GetPixels and similar functions to work. Textures are not set as readable by default.

When texture is not readable, it consumes much less memory, because a system-memory copy does not have to be kept around after texture is uploaded to the graphics API.