How can I replace multiple materials?

Hi I am a 3d artist living in Seoul.

How can I replace multiple materials?
When importing multiple fbx, the same material is imported separately.
I can replace them one by one, but I have to deal with more than 1000 fbx.
Is it possible to replace multiple materials by any way?
Or is it possible to import materials with the same name into one material when importing multiple fbx?
I really want an answer.

Hi @shinhy and welcome,

You can do that by selecting one of the duplicate materials on the assets panel, right click to get the context menu shown and select replace.

Then you will be prompted to click on the replacement material. I don’t think there is any way to do that in a batch right now unless you are attempt to use the editor API to code an editor script function. @yaustar anything to add?

1 Like

What do you mean by ‘replace’?

Are you trying to share materials between FBXs? If so, I’m afraid there isn’t a way to do that at the moment. You may be able to use the Editor API (Editor API | Learn PlayCanvas) to script something that can link/patch up references so that duplicate materials with the same are removed and the references fixed but we don’t have an out of the box solution for this.

2 Likes


This is the replace I’m talking about.

It doesn’t support the function yet, and I have to use the Editor API to replace multiple materials.

Okay.
Your answer has been of great help.

thank you

Thank you for answer.
Right now, the only way is to work hard.

Unfortunately, that method only works on one material at a time. You could find the code in the editor.js in devtools that does this so you can do it in a loop or script the behaviour?

1 Like

I’m a little 3d modeler, so I don’t have scripting skills.

If you give me a little hint, I’ll try Googling and YouTube search.

Thanks for the quick reply.

Ah, if you don’t have scripting skills then that’s going to be problematic. I recommend asking the programmer on your team (if you have one)

2 Likes

Oh, I see.
I’ll check.
thank you~!