- Home /
SetPixels32, no option for a rect argument?
While SetPixels32 performance is great, there is no option to use a rect as an argument, like the origianl SetPixels:
function SetPixels (x : int, y : int, blockWidth : int, blockHeight : int, colors : Color[], miplevel : int = 0) : void
Is there any plan to include this in the future?
I agree. $$anonymous$$ind of defeats the performance gains if you have to regenerate/resend the whole image when only a few pixels change (my use-case is a map with receding fog-of-war).
Answer by helpautism2 · May 23, 2017 at 06:45 AM
They did include it now: https://docs.unity3d.com/ScriptReference/Texture2D.SetPixels32.html (all the way to the bottom of that page).
Your answer
Follow this Question
Related Questions
Performance issue. Optimize or change SetPixel to allow for painting specific areas of a texture. 1 Answer
SetPixels32 called with invalid number if pixels in the array 1 Answer
SetPixels32 On A Sprite In Texture2D Atlas 0 Answers
runtime check for OpenGL 1 Answer
Texture2D setPixels Alpha merging 0 Answers