- Home /
Change Texture size but keep aspect ratio the same!
I have a texture that is 512x348. In photoshop i can expand the canvas size to 512x512 which maintains the images aspect ration by adding borders of a chosen color to the edges.
Is there anyway to script this in unity. Ie layer 2 textures together one at 512x380 and the other at 512x512 and save the resulting image texture?
I have a resize script but nothing that will change the canvas size like in photoshop?
Answer by JasonM · Nov 03, 2011 at 07:53 PM
Click on the texture, then look at the inspector where the import settings are. You'll see 'Texture Type', change it to Advanced, then set the non-power of 2 to whichever makes you happy. This will import the texture and add that bit of canvas you need.
Your answer
Follow this Question
Related Questions
Resizing GUI textures 0 Answers
Guilayout problems with image resize 0 Answers
GUITexture aspect ratio resize 1 Answer
Combining textures - Flatten effect. 2 Answers
When resize ,texture is grey. 2 Answers