A Cubemap is a collection of six separate square Textures that represent the reflections on an object from its environment. The six squares form the faces of an imaginary cube that surrounds the object; each face represents the view along the directions of the world axes (up, down, left, right, forward and back). Assuming the squares match seamlessly at the edges, Unity’s Reflective built-in shaders can use a cubemap to display the surrounding view as it is reflected by the object.
|Right (+X)||Texture for the right face of the Cubemap.|
|Left (-X)||Texture for the left face of the Cubemap.|
|Top (+Y)||Texture for the top face of the Cubemap.|
|Bottom (-Y)||Texture for the bottom face of the Cubemap.|
|Front (+Z)||Texture for the forward face of the Cubemap.|
|Back (-Z)||Texture for the rear face of the Cubemap.|
|Face Size||Width and Height of each Cubemap face in pixels. The textures will be scaled automatically to fit this size.|
|Mipmap||Should mipmaps be created?|
|Linear||Should the cubemap use linear color?|
|Format||Should the cubemap allow scripts to access the pixel data?|
You can create a new cubemap asset from the editor by selectingfrom the menu. If you have six suitable images available then you can assemble the cubemap manually simply by dragging the textures to the empty slots in the inspector.
You can also use the Generate Cubemap option on the Texture Importer to produce a cubemap automatically from a single image. The importer will wrap the image around and join the edges but you will need to start with an image designed for this purpose to get the best results.
Another useful technique is to generate the cubemap from the contents of a Unity scene using a script. The Camera.RenderToCubemap function can record the six face images from any desired position in the scene; the code example on the function’s script reference page adds a menu command to make this task easy.