Cubemap
Class for handling cube maps, Use this to create or modify existing cube map assets.
Read time 7 minutesLast updated 3 days ago
Definition
- Type: Class
- Namespace: UnityEngine
- Assembly: UnityEngine.CoreModule
- Inherits from: Texture
public sealed class Cubemap : Texture
Remarks
This class does not support Cubemap creation with a Crunch compression TextureFormat.
Constructors
Constructor | Description |
|---|---|
| Cubemap(System.Int32,UnityEngine.TextureFormat,System.Boolean) | Create a new empty cubemap texture. |
| Cubemap(System.Int32,UnityEngine.TextureFormat,System.Boolean,System.Boolean) | Create a new empty cubemap texture. |
| Cubemap(System.Int32,UnityEngine.TextureFormat,System.Int32) | Create a new empty cubemap texture. |
| Cubemap(System.Int32,UnityEngine.TextureFormat,System.Int32,System.Boolean) | Create a new empty cubemap texture. |
Properties
Property | Description |
|---|---|
| desiredMipmapLevel | The mipmap level that the streaming system would load before memory budgets are applied. |
| format | The format of the pixel data in the texture (Read Only). |
| loadedMipmapLevel | The mipmap level that is currently loaded by the streaming system. |
| loadingMipmapLevel | The mipmap level that the mipmap streaming system is in the process of loading. |
| requestedMipmapLevel | The mipmap level to load. |
| streamingMipmaps | Determines whether mipmap streaming is enabled for this Texture. |
| streamingMipmapsPriority | Sets the relative priority for this Texture when reducing memory size to fit within the memory budget. |
Methods
Method | Description |
|---|---|
| Apply | Copies changes you've made in a CPU texture to the GPU. |
| ClearRequestedMipmapLevel | Resets the requestedMipmapLevel field. |
| CopyPixels | Copies pixel data from another texture on the CPU. |
| GetPixel | Gets the pixel color at coordinates ( |
| GetPixelData | Gets the raw data from a texture. |
| GetPixels | Gets the pixel color data for a mipmap level of a face as Color structs. |
| IsRequestedMipmapLevelLoaded | Checks to see whether the mipmap level set by requestedMipmapLevel has finished loading. |
| SetPixel | Sets the pixel color at coordinates ( |
| SetPixelData | Sets the raw data of an entire mipmap level of a face directly in CPU memory. |
| SetPixels | Sets the pixel colors of an entire mipmap level of a face. |
| SmoothEdges | Performs smoothing of near edge regions. |
| UpdateExternalTexture | Updates Unity cubemap to use different native cubemap texture object. |
Static Methods
Method | Description |
|---|---|
| CreateExternalTexture | Creates a Unity cubemap out of an externally created native cubemap object. |
Inheritance
Operators
Operator | Description |
|---|---|
| operator == | Compares two object references to see if they refer to the same object. |
| bool | Determines whether the object exists. |
| operator != | Compares if two objects refer to a different object. |