Skip to content

Textures

mika edited this page Dec 22, 2017 · 1 revision

Textures

  • void CreateTexture(string id, int width, int height)
    • creates bitmap texture with given widht/height
    • use id to access it later
    • textures are stored in scene gameobject (so if mode changes, or you call ClearObjects(), also textures are destroyed)
  • void ClearTexture(string target, int r, int g, int b)
    • clears texture with given color
  • void AssignTexture(string target, string id)
    • assign texture to target gameobject material
  • AssignLibraryTexture(string target, string textureName)
    • assigns texture from library, list: link missing
  • void SetPixel(string id, int x, int y, int r, int g, int b)
    • draw pixel to texture
  • string GetPixel(string id, int x, int y)
    • get pixel color from texture
    • result string is in format: r,g,b,a
Clone this wiki locally