unity-game-enginedrawtexture-mappingtexture2d

How would I draw onto A texture in unity's bolt?


I'm trying to make a unity project where the player can draw onto specific walls, kind of like splatoon or more specifically, teardown, but a bit more drawing focused. The project uses Bolt as its primary source of making code. (I find it much easier for me to work with visual scripting.)

I assume I shouldn't decals for performance reasons, Texture.SetPixel(s) has caused some minor issues and does not show any changed pixels, and I cant really find any other ways to overlay an image onto another image like a brush. Does anyone have a visual-scripting-friendly solution? thanks :) (minor note: i'm trying to stay away from shaders for this but i'm fine using them.)

edit: here is the script for drawing a pixel onto the texture that I was having issues with.


Solution

  • I spent a few days solving this and finally fixed it, issue resolved. I was not using the right raycast, hence it could not detect I was hitting the surface. SetPixel and Texture.apply were not the issue here.