Help with updating a sprite Texture2d from another sprite.
I have been trying to make this work all day with no luck. Could someone give me some helpful pointers?
I have a 320x320 wall texture on a sprite. I have another decal sprite that is 32x32.
On a triggered action, I want to take that decal sprite and draw it onto the wall texture.
I have tried using GetPixels32()/SetPixels32() but it doesn't update the screen as I would expect. I have a feeling this is a dead-end path as I'm guessing this will be very slow.
It looks like I'll need to create a render texture, apply the decal texture to the render texture, then render that, and apply it back to the sprite. If I try to apply it directly to the sprite, I get an error about WallObject.GetComponent().sprite.texture is ready only.
I've found a few references here and there about people running into problems with RenderTexture, but no single guide on how to properly use RenderTexture to, well, render a texture.
Thank you for any help in advance.
Your answer
Follow this Question
Related Questions
Mesh texture doesn't applies correctly 1 Answer
how to create texture at runtime and assign to skybox? 0 Answers
OpenGL textures always show up black 0 Answers
How to draw a texture on another texture 0 Answers
How to get rgb from Texture2D faster? 0 Answers