Resize Pro

Copyright © 2012 - 2025 Amazing Assets

amazingassets.world

Editor Window

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.


Resize options

Editor tool allows textures resizing by:

  • Percentage - Generated texture size is scaled by Percent property.

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.

  • Max Resolution - Texture is resized depending on which its property is bigger, width or height, that is set to Resolution value and another property is adjusted to preserve aspect ratio.

Textures with less resolution are not resized.

  • Pixel - Textures are resized by providing exact Width and Height values.

Editor window displays resolution of the original file, imported Unity texture object and resultant new file.


Save Options

Replace Textures - Replaces textures in Unity assets (materials, prefabs and scenes) with their resized equivalents. As textures replacement requires files manual modifying, for security reasons the Editor tool automatically creates assets backup copies in the folder outside of the project.

Format - Editor converter can ready all texture file formats supported by Unity, but generated file can be saved only in JPG/JPEG (8bits per-pixel), PNG(8bits per-pixel), TGA(8bits per-pixel) or EXR(16 and 32bits per-pixel) formats.

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.

Name Prefix / Suffix - Adds prefix and suffix to the generated file name.

Save Location - generated files can be saved in:

  • Same folder - Saving resized textures in the same folder will overwrite original textures that have the same file extensions and do not use Prefix / Suffix. All materials, scripts and other resources do not lose references and automatically use new textures.

Inside editor window textures that will be overwritten with the new textures, have yellow highlights:

  • Same Subfolder - Resized textures are saved in the same folder as the original files but inside user defined subfolder. Original textures are not overwritten.

  • Custom folder - Generated textures can be saved anywhere on the hard drive. Save location needs to have Read/Write permission.

Batch Mode

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.


Additional Editor Options

  • Clicking on the column’s header sorts list ascending or descending.

  • Textures loaded inside editor window can be filtered by extension, type, format and resolution using the Remove button on the right side of each file.

Tooltip displays all available options:

  • Using context menu can be reset editor window settings or open saved file or folder:


RUN-TIME API

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.