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.
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?
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.
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?