pyunity.values.texture module

class pyunity.values.texture.Material(color, texture=None)[source]

Bases: object

Class to hold data on a material.

color

An albedo tint.

Type:Color
texture

A texture to map onto the mesh provided by a MeshRenderer

Type:Texture2D
class pyunity.values.texture.Color[source]

Bases: object

to_string()[source]
static from_string(string)[source]
class pyunity.values.texture.RGB(r, g, b)[source]

Bases: pyunity.values.texture.Color

A class to represent an RGB color.

Parameters:
  • r (int) – Red value (0-255)
  • g (int) – Green value (0-255)
  • b (int) – Blue value (0-255)
to_rgb()[source]
to_hsv()[source]
static from_hsv(h, s, v)[source]
class pyunity.values.texture.HSV(h, s, v)[source]

Bases: pyunity.values.texture.Color

A class to represent a HSV color.

Parameters:
  • h (int) – Hue (0-360)
  • s (int) – Saturation (0-100)
  • v (int) – Value (0-100)
to_rgb()[source]
to_hsv()[source]
static from_rgb(r, g, b)[source]