Important: Deprecation of Legacy Script Projects (1st March 2021)

It’s been over 4 years since we have introduced Scripts 2.0 that allowed for real-time collaborative coding, hot swapping code at run time and many more benefits.

We have kept support for legacy script projects for as long as we can and unfortunately, we will have to start deprecating these projects in order to move forward with our future plans to further improve PlayCanvas and its service.

Once deprecated, these projects will become read-only. To continue development, you will have to migrate to a new PlayCanvas project.

Here is a guide to help migrate the projects: https://developer.playcanvas.com/en/user-manual/scripting/migration-guide/

The date for deprecation is not yet finalized but it is looking like early Q1 2021.

The date for deprecation is now 1st March 2021

If you have any questions, please don’t hesitate to comment below or email us at support@playcanvas.com.

6 Likes

Has the documentation for upgrading been published somewhere?

I’ve made a new project and converted all the scripts to 2.0 for one of my projects but remaking the scene is going to take a bit more effort. Is there a way to import a scene/other assets from the old project? I tried exporting the project as a zip (and did find some pngs for example) but I’m not sure how to go about uploading a scene.

Also after you import/upload a script it looks like you have to click parse on it and this is not obvious. The editor was creating duplicate scripts with the same name when I was trying to add them to entities at first.

Anyway the new project looks like it also has some source control feature built in which looks nice :slight_smile:. I’m also excited for the hot-swap/other 2.0 features! Welcome to 2016 for me I guess hah.

Not yet, unfortunately.

For assets, you can now copy and paste between projects (see copy and paste section here: https://developer.playcanvas.com/en/user-manual/designer/assets/)

Not documented, but you can also do the same with Entities in the scene hierarchy :grimacing:.

1 Like

Thanks, assets worked like a charm.
Copy/pasting entities in the scene hierarchy seems to only work between scenes in the same project and not from the old project scene to the new project (paste is grayed out). Is that right?

Interesting, last time I tried it, it worked between projects. :thinking:

After further testing It looks like copy paste from the scene hierarchy works between two new/2.0 projects as well. If you know a way to copy from scene hierarchy on old version to new let me know!

@will, how did you manage to do this?

I believe that you can copy hierarchy from a script 1.0 scene to a scripts 2.0 scene if there are no script components in the selection.

So if you want to copy everything in the source scene, one option is the following:

  1. Select all entities in the scene with a script component by running the following in the JS console:
var entities = editor.call('entities:list').filter(function(entity) {
    return entity.has('components.script');
});
if (entities.length) {
    editor.call('selector:set', 'entity', entities);
} else {
    editor.call('selector:clear');
}
  1. Delete the script components in the Inspector.
  2. Copy and paste everything you want to the destination scripts 2.0 scene.
  3. CTRL+V in the scripts 1.0 scene to get the script components restored again.

You might wanna set a checkpoint before you do that. :smile:

1 Like

read-only could be replaced with read-more

The migration guide has now been posted by Will: https://developer.playcanvas.com/en/user-manual/scripting/migration-guide/

2 Likes

I’ve updated the first post as we have now set a date for deprecation.

1st of March 2021 is the final date before legacy projects become read only!