Cubemap.Cubemap Manual     Reference     Scripting  
Scripting > Runtime Classes > Cubemap

static function Cubemap (size : int, format : TextureFormat, mipmap : bool) : Cubemap


Create a new empty cubemap texture.

The texture will be size on each side and with or without mipmaps.

Usually you will want to set the colors of the texture after creating it, using SetPixel and Apply functions.

function Start () {
// Create a new texture and assign it to the renderer's material
var texture = new Cubemap (128, TextureFormat.ARGB32, false);
renderer.material.mainTexture = texture;

See Also: SetPixel, Apply functions.