pub struct CubemapArray {Show 15 fields
pub m_ColorSpace: i32,
pub m_CubemapCount: i32,
pub m_DataSize: u32,
pub m_Format: i32,
pub m_IsReadable: bool,
pub m_MipCount: i32,
pub m_Name: String,
pub m_TextureSettings: GLTextureSettings,
pub m_Width: i32,
pub image_data: Option<Vec<u8>>,
pub m_DownscaleFallback: Option<bool>,
pub m_ForcedFallbackFormat: Option<i32>,
pub m_IsAlphaChannelOptional: Option<bool>,
pub m_StreamData: Option<StreamingInfo>,
pub m_UsageMode: Option<i32>,
}Expand description
CubemapArray is a class of the Unity engine since version 5.5.0f3. Exert from Unity’s scripting documentation: Class for handling Cubemap arrays. Modern graphics APIs (e.g. D3D10.1 and later, OpenGL 4.0 and later, Metal on macOS, PS4) support “cubemap arrays”,
which are arrays of same size & format cubemaps. From the shader side, they are treated as a single resource, and sampling
them needs an extra coordinate that indicates which array element to sample from.Typically cubemap arrays are useful for implementing efficient reflection probe, lighting and shadowing systems
(all reflection/cookie/shadow cubemaps in a single array).Cubemap arrays do not have an import pipeline for them, and must be created from code, either at runtime or in editor
scripts. Using Graphics.CopyTexture is useful for fast copying of pixel data from regular Cubemap textures into
elements of a cubemap array. From editor scripts, a common way of creating serialized cubemap array is to create it,
fill with data (either via Graphics.CopyTexture from regular cubemaps, or via SetPixels or
SetPixels32) and save it as an asset via AssetDatabase.CreateAsset.Note that not all platforms and GPUs support cubemap arrays. Use SystemInfo.supportsCubemapArrayTextures to check. Also, this class does not support CubemapArray creation with a Crunch compression TextureFormat.
Fields§
§m_ColorSpace: i32§m_CubemapCount: i32Number of cubemaps in the array (Read Only).
m_DataSize: u32§m_Format: i32Texture format (Read Only).
m_IsReadable: boolWhether Unity stores an additional copy of this texture’s pixel data in CPU-addressable memory.
m_MipCount: i32§m_Name: StringThe name of the object.
m_TextureSettings: GLTextureSettings§m_Width: i32Width of the Texture in pixels (Read Only).
image_data: Option<Vec<u8>>Vec
m_DownscaleFallback: Option<bool>bool: (2017.3.0b1 - 2022.3.2f1)
m_ForcedFallbackFormat: Option<i32>i32: (2017.3.0b1 - 2022.3.2f1)
m_IsAlphaChannelOptional: Option<bool>bool: (2020.2.0b1 - 2022.3.2f1)
m_StreamData: Option<StreamingInfo>StreamingInfo: (5.6.0b1 - 2022.3.2f1)
m_UsageMode: Option<i32>i32: (2020.2.0b1 - 2022.3.2f1)