Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Not all asset types are supported #36

Open
timleader opened this issue May 5, 2022 · 1 comment
Open

Not all asset types are supported #36

timleader opened this issue May 5, 2022 · 1 comment
Labels
enhancement New feature or request

Comments

@timleader
Copy link

I am looking to use the approach described here https://github.com/playcanvas/playcanvas-sync#case-2-single-user-per-playcanvas-branch-with-git though am running into issues when trying to sync certain asset types, eg. material, animation graph. I feel that if we don't place all assets into the VCS of our choice we will have a nightmare of trying to keep our VCS branches in sync with PlayCanvas VCS. Can all asset type be supported? Do I not have the right approach?

C:\playcanvas\pc_test>pcsync pullAll -y -e js,cube,png,html,css,anim
C:\playcanvas\playcanvas-sync\src\api-client.js:85
    const name = asset.file.filename;
                            ^

TypeError: Cannot read properties of null (reading 'filename')
    at ApiClient.makeDownloadStream (C:\playcanvas\playcanvas-sync\src\api-client.js:85:29)
    at ApiClient.loadAssetToFile (C:\playcanvas\playcanvas-sync\src\api-client.js:73:25)
    at OverwriteAllLocalWithRemote.fetchFile (C:\playcanvas\playcanvas-sync\src\sync-commands\overwrite-all-local-with-remote.js:51:32)
    at OverwriteAllLocalWithRemote.handleAllFiles (C:\playcanvas\playcanvas-sync\src\sync-commands\overwrite-all-local-with-remote.js:44:24)
    at OverwriteAllLocalWithRemote.run (C:\playcanvas\playcanvas-sync\src\sync-commands\overwrite-all-local-with-remote.js:15:20)
    at processTicksAndRejections (node:internal/process/task_queues:96:5)
@yaustar
Copy link
Collaborator

yaustar commented May 5, 2022

playcanvas-sync was originally designed for textural based formats such as JS and JSON.

The pcsync and pcwatch utilities allow editing copies of JavaScript and other textual files of a PlayCanvas project locally on your own computer, in a text editor of your choice.

It can support binary files such as JPGs PNGs as mentioned here: https://github.com/playcanvas/playcanvas-sync#using-pcsync-for-non-text-files

It doesn't support all assets such as materials and anim state graph unfortunately.

We are looking to make the parts of the PlayCanvas Version Control public in the next few months that will make it easier to create scripts/workflows to have the external and PlayCanvas Version Control in sync.

Ticket: playcanvas/editor#498

We are thinking of ways to be able to get all the assets locally but it's not straightforward due to how that data is stored on projects in databases. They aren't files on storage unlike texture and model files hence it's not possible at the moment.

@yaustar yaustar added the enhancement New feature or request label May 5, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants