I want to resize a texture during runtime. What is the best way to do this. I tried texture2D.Resize (), but it messed up the texture.
Out of curiosity, to what end?
I want to make a resizable brush for a paint game. I could make prebuilt brushes of different sizes, but I would rather resize them in the game dynamically.
You’ll have to implement resizing manually. From something simple like point filtering, to bilinear, to whatever filtering you want.
If the brushes are just blobs of colour rather than arbitrary images, then you could probably just generate them on the fly. Say, if you want a 20x20 circle then create a new Texture2D of the right size and fill a circular area within it using the appropriate colour. Unless the brush sizes are enormous then the construction of the brush textures should be pretty fast - there shouldn’t be any noticeable delay when the user picks a new brush colour or whatever.