CompressedTextureLayered
Shared imported array and cubemap loading.
Base type for CompressedTexture2DArray, CompressedCubemap and CompressedCubemapArray. Construct the concrete type matching the import. Outputs use .ctexarray, .ccube and .ccubearray. Layered headers are checked against the chosen LayeredType. Load ordinary source images through ResourceLoader with import remapping.
Before loading, dimensions and layer count are zero. GetRid can create a placeholder and does not establish available layers. Successful Load derives dimensions, format, mipmaps and layer count from imported images. Reload preserves RID and emits Changed; LoadPath invokes it without exposing Error.
GetLayerData(index) reads an existing layer image: 0 ≤ index < GetLayers(). Cubemap layers count faces; a two-cubemap array was checked with 12 layers. Returned Images do not provide a GPU update interface.
Actual Lossless import, first-layer readback and reload were checked for all three kinds on Windows/Vulkan without mipmaps. Drawn face orientation, shaders, VRAM/Basis/Lossy, mip chains and performance were not tested.
Declarations checked against C# SDK 1.0.0. Expand a name to see declarations and documentation.
Properties1
LoadPathProperty
public string LoadPath { get; set; }Reading returns the imported path; assigning invokes Load but the setter does not return its Error. Call Load explicitly to handle the result. Expects .ctexarray / .ccube / .ccubearray, not a source PNG/JPEG. Do not base asset identity on changeable hashed import-cache paths.
Methods2
GetLoadPathstring
public string GetLoadPath();Returns the last successfully read imported-file path. Not necessarily the source PNG ResourcePath and not a new image import.
stringStored imported-file path, or empty before loading.
LoadError
public Error Load(string path);Reads imported-file data .ctexarray / .ccube / .ccubearray and updates this instance’s GPU data. Does not import arbitrary images: load ordinary project PNG/JPEG assets through ResourceLoader. Successful reload preserves the RID and emits Changed even for the same path. Does not reassign ResourcePath. Check the returned Error and diagnostics.
| Name | Type | Default |
|---|---|---|
path | string | — |
pathExisting matching imported-file path .ctexarray / .ccube / .ccubearray; not a source PNG path.
ErrorResult Error. Check Error.Ok and resource state; this is not a visual-quality test.