- Home /
Get a portion of a Texture2D to another Texture2D
Im trying to figure out how to use a spritemap for my 2D iPhone space shooter. And im having trouble figuring out how you can get get a portion of a Texture2D and set it to another Texture2D?
So far i have been using Texture2D.GetPixels. But that returns a Color array, how do i get that data into another Texture2D?
Comment
Best Answer
Answer by Dreamora · Aug 15, 2010 at 12:05 AM
You would use the counterpart of *GetPixel, which is Set*Pixel on the target texture to change it. To do so both must be marked for get-set pixels in the import settings.