Skip to main content

Texture

info
  • This class is only available on LocalAvatarScripts and LocalScripts

A class which allows developers to create textures at runtime.

Methods

Method NameReturn TypeParametersDescription
Resizevoidint, intResizes the Texture
SetPixelsRawvoidbyte[]Sets the raw data of an entire mipmap level directly in CPU memory
SetPixelvoidint, int, ColorSets the pixel color at coordinates (x,y)
ApplyvoidnoneCopies changes you've made in a CPU texture to the GPU

Properties

Property NameTypeDescription
IsReadableboolWhether Unity stores an additional copy of this texture's pixel data in CPU-addressable memory (Readonly)
WidthintThe width of the texture in pixels (Readonly)
HeightintThe height of the texture in pixels (Readonly)
PointFilterboolWhether to use Point filtering or Bilinear filtering