A simple tool for syncing material properties across multiple projects

Hello everyone,

I’ve been working on multiple projects that need to share the same materials, and I found it really tedious to manually copy and paste material properties (like reflectivity, tiling, or color values) every time I made a small change.

To solve this, I built a small automation tool called “PlayCanvas Material Share.” I wanted to share it with the community in case anyone else has the same problem.

It uses a two-part system:

A Tampermonkey UserScript: This adds a “Sync Material” button to the editor UI. You select your “master” materials in your source project, click the button, and it sends the data to the backend.

A local Go (Golang) Server: This server runs on your computer. It catches the data from the script and then uses Playwright (a browser automation tool) to open all your other projects (which you list in a url.txt file) and apply the changes one by one.

A few key points:

It matches materials and textures based on their NAME.

It runs sequentially (one project after another) on purpose to comply with the PlayCanvas API rate limits.

It uses a saved auth.json session file, so you only have to log in manually the very first time.

It’s all open-source on GitHub, so you can check it out, fork it, or just see how it works. The README has the full setup instructions.

Here is the repository: GitHub - shin1244/playcanvas-material-share

Let me know what you think!

11391

A Note on reflectivity: You may notice specific hardcoding for the reflectivity property. This is to work around a discrepancy in the PlayCanvas editor: the UI allows reflectivity values up to 8, but the internal schema (editor.schema) incorrectly defines its maximum as 1. The script bypasses this schema limit to sync the correct values.

3 Likes