material-maker icon indicating copy to clipboard operation
material-maker copied to clipboard

Unity export: re-exporting textures broke existing materials

Open farlenkov opened this issue 2 years ago • 1 comments

Material Maker version: 1

OS/device including version: Windows 10 GTX 2070 Super

Issue description: I want to use textures in URP project, so I can't use materials from "Unity - 3D" or "Unity - HDRP" export options and has to create a new separate materials and link exported textures to it. But when I iterate on my textures in Material Maker and re-export it to Unity all links to the textures became broken and all settings of those textures are reverted.

Steps to reproduce:

  1. Export to Unity
  2. Change import settings of textures
  3. Create new materials and link textures
  4. Re export from Material Maker
  5. Result: all import settings are reverted and all links to the textures are broken

Suggestion: Do not override existing .meta files when re-exporting the textures.

farlenkov avatar Sep 17 '22 08:09 farlenkov

That's the way current exports work, and not overwriting .meta files would break them.

It is easy to create either an URP export target or an export target that does only write the texture files:

  • Select the Material node and hit Control-W
  • Click the pencil button
  • Select Export tab
  • Select a Unity export target and duplicate it
  • Do whatever changes you need: either adapt the .mat file or delete the files you don't need (select in the file list and hit Delete key)
  • To copy the modified Material node between projects, use the Copy and Paste items in the Material node's context menu

RodZill4 avatar Sep 21 '22 05:09 RodZill4

#518 adds a confirm window to overwrite mat/meta files when they exist already.

RodZill4 avatar Oct 07 '22 19:10 RodZill4