[SOLVED] Is there any way to use version control with current playcanvas?


#1

Hi guys, I’m wondering the information about version control system on current playcanvas.
Now I can’t use git synchronization on playcanvas?
Like here? https://developer.playcanvas.com/en/user-manual/scripting/legacy/workflow/


#2

Not at the moment. The team is working on version control last I heard on the forums.

What I do at at the moment on the ORG account is to export the project via the REST API and check that into version control. It doesn’t give me all the benefits but at least allows me to check between different versions of the project.

Alternatively, the other practise is to fork the project to create a ‘tag’ and/or export the published build and again, check that into version control.


#3

I understood and thank you so much.
That is very similar for our situation. (using API and use “fork” function.)


#4

Yes, the integrated version control support is due to roll out very soon this month. Stay tuned for updates…


#5

We’ve just released this today.


#6

Congrats!
Is this stable or only testing period?


#7

This is the stable release. We’ve had developers using it in production for a while now.


#8

Thanks a lot.
and how to choose the branch via export API?
In our company, deploying is using export API.


#9

Hey, it’s great you have version control support integrated into the editor. It was a major missing feature that kept me away from using PlayCanvas.
Having a look again, I’m left with some questions:

  • There appears to be no way to link to an external repository, have I missed the link?
  • How would you now develop scripts in a local environment? The option to ‘launch with local server’ seems to have gone.
  • If neither of these are available, is there a possibility of uploading source files from an external source. I have an application framework that injected system management support into PlayCanvas. Wondering how this would now work.
  • Originally I used legacy scripts to make use of the version control support, the legacy script option seems to have gone, also my projects that used legacy scripts now fail to export. Has this functionality been deprecated?

Thanks


#10

The new version control system is fully integrated with the PlayCanvas platform. It does not utilize an external version control solution.

You would use a file watcher and the REST API to upload changed scripts. We’re developing some tools to make this easier if this is the route a developer wants to take.

Using the REST API, you can upload scripts - potentially ones that have been fetched from some external source.

Legacy scripts was deprecated in July 2016. We’re slowly removing options around creating/forking projects that use legacy scripts, especially now that we have the integrated version control and the REST API. However, I’m a little surprised your legacy script projects fail to export. I just tested both exporting a legacy script project and generating a web download of a legacy script project. Both worked fine. Do you have a public project for which this doesn’t work?


#11

Hi Will,
Thanks for answering.

Whilst not ideal, if script uploading (I’m assuming uploading to a particular branch is also supported) is possible then there are things I can do with that.

I realise legacy scripts were deprecated a long while ago, however the lack of version control support in the newer scripting environment removed the possibility of me taking advantage of that and left legacy scripts as the only viable option.

The ability to export as a zip file is not available for public projects (I just tested with an old public project I have), however my private projects always fail with:
export_fail
(I clicked ‘web download’ here).

Thanks again,
n!


#12

Hi,

I’m looking through our logs and it looks like there is missing script in your project. Is it possible one of your script component references a file: scripts/rendering/shader_library.js which no longer exists?


#13

hmmm, that file appears in the project browser and is editable (from within the PlayCanvas editor).
However, if you believe it could be an issue with the project itself I can investigate that further.

Thanks,
n!


#14

That does suggest it is present in the project. Let me take a further look.


#16

A quick thought I had, if git integration is gone. Could the PlayCanvas export process have an issue with files that were brought in via github. I thought they were just pulled in and stored locally, but that is an assumption on my part.


#17

The files are stored on our servers so it shouldn’t have changed. Also, git integration still exists for legacy projects. Currently the only thing we’ve disabled is creating new legacy projects.

We’re conscious that there are existing projects using this system so we’re trying not to impact them too greatly as we move forward.


#18

Hi @nfactorial - I believe we’ve deployed a fix for your export problem. Can you give it a whirl and let me know if there’s still a problem?


#19

Hey Will,
I did reply directly to Dave, it has indeed fixed my export issue. Thanks very much!

n!