Resize Pro
Copyright © 2012 - 2025 Amazing Assets
The Resize Pro editor window can be opened from Unity’s Main Menu → Window → Amazing Assets → Resize Pro.
Textures for resizing can be added to this window using provided toolbar buttons or by drag & drop texture assets from Project window, same as materials and entire folders.
Note, all textures displayed inside this editor window are loaded into a memory. If it is required to resize a big number of textures, better use Batch Mode. |
Editor tool allows textures resizing by:
If checkbox is enabled, resultant texture’s width and height values are calculated based on the original file resolution, otherwise from imported Unity texture asset.
Textures with less resolution are not resized.
Editor window displays resolution of the original file, imported Unity texture object and resultant new file.
If checkbox is enabled, generated file is saved in the same format and extension as its source texture only if it is in JPG, PNG, TGA or EXR formats. All other files are saved using selected Format.
Inside editor window textures that will be overwritten with the new textures, have yellow highlights:
Source Folder - Textures location folder. Must be a project relative path.
Include Subfolders - If enabled, all files from the Source Folder’s subfolders are read.
Destination Folder - Generated texture files save location. Can be any folder on the hard drive with Read/Write permission.
Save Folder Structure - If enabled, resized textures are saved inside the Destination Folder with the same folder structure as the source textures have in the Source Folder.
If disabled all textures are saved in the Destination Folder. In this case, files with the same name and extension will overwrite each other.
Filter - Filter for choosing which textures will be read and resized from the Source Folder, by providing .extensions and @names separated by * symbol.
For example:
resizes only files with .jpg and .png extensions and the Albedo word in the file name.
HDR - Used for resizing HDR textures.
Tooltip displays all available options:
Resize Pro run-time API can be brought into scope with this using directive:
using AmazingAssets.ResizePro;
Now Unity Texture2D class will have new ResizePro extension methods.
bool ResizePro(int width, int height, bool linear, bool hasMipMap, bool compress)
bool ResizePro(int width, int height, bool linear, bool hasMipMap, TextureFormat textureFormat)
Resizes source texture with new width and height.
linear – Used for resizing non-color textures (BumpMap, DisplaceMaps, etc).
hasMipMap – Calculates mipmaps after resizing.
compress – After resizing, texture can be compressed using Unity’s compress method.
textureFormat – Allows changing texture format after resizing. Only uncompressed formats are allowed.
Methods return false if texture resizing fails. Source texture in this case is not modified.
Note, above resize methods work only with textures that are not locked by system memory and have Read/Write flag enabled inside Texture Import Settings. |
bool ResizePro(out Texture2D dstTexture, int width, int height, bool linear, . . . . .)
Exactly the same resize methods as above, except source texture is not modified and resized texture data is saved inside dstTexture variable.
Those methods read data from any textures, even if they have no Read/Write flag enabled and are locked in memory.
bool IsTextureResizable()
Returns true if texture is readable and can be resized.