This small editor tool makes it simple to create materials from folders of textures.
The tool assumes that one folder contains all the textures for one material.
Custom rules can be defined to match file names and shader properties using regular expressions (not case-sensitive).
- Select the folders that should be converted into materials
- Right-click on the selection
- Click
Create > Material(s) from Textures
- Specify the shader
- If required adjust settings
- Click
Create Material(s)
Installation using the Package Manager:
- Click on the
+
in thePackage Manager
window - Chose
Add package from git URL...
- Insert the following URL
https://github.com/JonasWischeropp/unity-materials-from-textures.git
A specific release version can be specified by appending#<version>
(e.g....xtures.git#1.0.1
). - Press the
Add
-Button
├── desert_ground_01_2k
│ ├── desert_ground_01_ambientOcclusion_2k.png
│ ├── desert_ground_01_baseColor_2k.png
│ ├── desert_ground_01_height_2k.png
│ ├── desert_ground_01_m_ao_h_r_2k.png
│ ├── desert_ground_01_metallic_2k.png
│ ├── desert_ground_01_normal_dx_2k.png
│ ├── desert_ground_01_normal_gl_2k.png
│ ├── desert_ground_01_roughness_2k.png
│ └── license.txt
├── stone_bricks_wall_07_2k
│ ├── license.txt
│ ├── stone_bricks_wall_07_ambientOcclusion_2k.png
│ ├── stone_bricks_wall_07_baseColor_2k.png
│ ├── stone_bricks_wall_07_height_2k.png
│ ├── stone_bricks_wall_07_m_ao_h_s_2k.png
│ ├── stone_bricks_wall_07_metallic_2k.png
│ ├── stone_bricks_wall_07_normal_dx_2k.png
│ ├── stone_bricks_wall_07_normal_gl_2k.png
│ └── stone_bricks_wall_07_roughness_2k.png
- The settings file can be found under
<Project Root>/ProjectSettings/Packages/wischeropp.jonas.materials-from-textures/Settings.asset
Shader Property Name Regex
matches with the description name (e.g.Albedo
) not the name used in the shader (e.g._MainTex
)- Due to the use of
MultiColumnListView
Unity 2022.1 or higher is required