Documentation

Unity Engine


User Manual

Script Reference

Unity Engine


Cubemap

Class for handling cube maps, Use this to create or modify existing cube map assets.
Read time 6 minutesLast updated 6 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

Properties

Property

Description

desiredMipmapLevelThe mipmap level that the streaming system would load before memory budgets are applied.
formatThe format of the pixel data in the texture (Read Only).
loadedMipmapLevelThe mipmap level that is currently loaded by the streaming system.
loadingMipmapLevelThe mipmap level that the mipmap streaming system is in the process of loading.
requestedMipmapLevelThe mipmap level to load.
streamingMipmapsDetermines whether mipmap streaming is enabled for this Texture.
streamingMipmapsPrioritySets the relative priority for this Texture when reducing memory size to fit within the memory budget.

Methods

Method

Description

ApplyCopies changes you've made in a CPU texture to the GPU.
ClearRequestedMipmapLevelResets the requestedMipmapLevel field.
CopyPixelsCopies pixel data from another texture on the CPU.
GetPixelGets the pixel color at coordinates (
x
,
y
).
GetPixelDataGets the raw data from a texture.
GetPixelsGets the pixel color data for a mipmap level of a face as Color structs.
IsRequestedMipmapLevelLoadedChecks to see whether the mipmap level set by requestedMipmapLevel has finished loading.
SetPixelSets the pixel color at coordinates (
x
,
y
).
SetPixelDataSets the raw data of an entire mipmap level of a face directly in CPU memory.
SetPixelsSets the pixel colors of an entire mipmap level of a face.
SmoothEdgesPerforms smoothing of near edge regions.
UpdateExternalTextureUpdates Unity cubemap to use different native cubemap texture object.

Static Methods

Method

Description

CreateExternalTextureCreates a Unity cubemap out of an externally created native cubemap object.

Inheritance

Inherited Members

Operators

Operator

Description

operator ==Compares two object references to see if they refer to the same object.
boolDetermines whether the object exists.
operator !=Compares if two objects refer to a different object.