How to sync/share a single material across 30+ projects?

Hello,

I am looking for a way to solve the hassle of manually copying material changes (like color or tiling values) to every project. I have over 30 projects that need to use the identical material, and updating them all one-by-one is very time-consuming.

I have looked into the REST API and playcanvas-sync, but I couldn’t find a clear solution for this specific workflow.

I have two main questions:

Is there a way to truly share a single material asset between different projects, so that an update in one place propagates to all of them simultaneously?

If is not possible, what is the best alternative? I know I can download a material as a .json file. Is there a way to programmatically apply this JSON data back onto a material asset in all my other projects (perhaps using the REST API)?

I would appreciate any advice on the best practice for managing this.

Thank you!

Hi so I am currently working a new PlayCanvas Code editor VSCode extension which uses realtime syncing. I am planning to extract the core into a new pc sync library.

This will enable writing and updating materials using scripts which you can use to sync changes across multiple projects.

A temporary solution could involve creating a custom browser extension that uses the Editor API to sync assets across projects. This is fine for updating asset values but getting it to work across multiple projects may be tricky.

1 Like