A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://docs.unity3d.com/Manual/sprite/../../ScriptReference/CubemapArray.SetPixels32.html below:

Unity - Scripting API: CubemapArray.SetPixels32

CubemapArray.SetPixels32 Suggest a change Success!

Thank you for helping us improve the quality of Unity Documentation. Although we cannot accept all submissions, we do read each suggested change from our users and will make updates where applicable.

Close Submission failed

For some reason your suggested change could not be submitted. Please <a>try again</a> in a few minutes. And thank you for taking the time to help us improve the quality of Unity Documentation.

Close Your name Your email Suggestion*

Cancel

Switch to Manual Declaration

public void

SetPixels32

(Color32[]

colors

,

CubemapFace face

, int

arrayElement

, int

miplevel

);

Declaration

public void

SetPixels32

(Color32[]

colors

,

CubemapFace face

, int

arrayElement

);

Parameters Parameter Description colors The array of pixel colours to use. This is a 2D image flattened to a 1D array. face The CubemapFace to write colors to. arrayElement The array slice to write colors to. miplevel The mipmap level to write colors to. The range is 0 through the texture's Texture.mipmapCount. The default value is 0. Description

Sets the pixel colors of an entire mipmap level of a face of a slice.

This method sets pixel data for the texture in CPU memory. Texture.isReadable must be true, and you must call Apply after SetPixels32 to upload the changed pixels to the GPU.

colors must contain the pixels row by row, starting at the bottom left of the face texture. The size of the array must be the width x height of the mipmap level.

SetPixels32 might be slower than some other texture methods because it converts the Color32 struct into the format the texture uses. To set pixel data more quickly, use SetPixelData instead.

You can use SetPixels32 with the following texture formats:

For all other formats, SetPixels32 fails. Unity throws an exception when SetPixels32 fails.

Additional resources: SetPixels, SetPixelData, GetPixels32, GetPixels, Apply, mipmapCount.


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4