☑ Replace Asset Reference


After a few FBX import and replaces, I have a bunch of duplicate materials which I’d like to unify. In Cinema 4D there is this fantastic function where you can drag one material over another (holding ALT I think) and that material will replace the first one also in all objects where the first one is used.

Is it possible to do something similar in Playcanvas? if not, perhap it can be added as a feature request.

best regards

  • Björn
1 Like

You can’t drag a material onto another in the PlayCanvas Editor. But there are other functions of the Editor that might help you in this area:

  1. You can drag and drop materials on to meshes in the 3D view. Read more…
  2. You can tell which assets are referenced by which entities/assets. Read more…
  3. You can control how materials are generated/overwritten when reimporting models. Read more…

Thanks for the suggestion though. I’ll add it as a feature request to our database.

1 Like

I had to replace sometimes one material with other, quiet often actually, and wrote small script to do that. Perhaps that could be a feature indeed!

1 Like

Cool. Yes indeed, I often find myself working on a refinement of a material for comparison and then when I’m ready I’d love to be able to replace the original.

On the same topic then, is it possible to remove or select “unused” materials?

  • Björn

There is small icon by asset:

That little circle before filename. That is Editor trying to be clever and figure out if asset is being used. But due to complexity of where and how it can be used, for example referenced in scripts, it is practically impossible to guarantee that asset is not used.
So treat this circle as “possibly unused” :smiley:
You can then search for *. in assets panel, which means search using regexp (starts with *) and . in regexp means “any character”, and select type of what you are looking for. You get all assets of a project, then you can select whatever you believe can be deleted.

As mentioned - it is scary to give button to users “delete stuff”, where there is no guarantee to be specific about what to delete.

Perhaps if there would be a search tool, that would allow to search for “potentially unused” stuff, that would allow you easier to see this content, and decide to delete it.

1 Like

Thank you. I’ll have a look at that.

Btw, I’ve NEVER come across a support team that answer so quickly with such relevant answers and examples. You should be proud of yourselves!

1 Like

Thank you!
It is warming to hear something like that, as we work really hard to communicate to those who produce good content.

Regarding unused assets, there is actually a manual on that:

1 Like

I’ve added Asset Replace feature.
Simply right-click on asset and select Replace (if it has any references), then pick another asset to replace it with.
It will find all references within: entities, assets, scene settings and replace it with new asset.

1 Like

That is super-convenient!, thank you!