Use the editor to create scenes, but use the engine to create game scripts

Using PlayCanvas engine programming is very convenient for programmers, but it is not suitable for designers to work, so I hope to let designers work in the editor, after testing the scene, download the zip, use the file in the zip, and then put it in the project repo for the engineer to load and write the game script according to the scene.
Is this possible please?
How should I use the playcanvas engine to load everything exported by the editor?

Hi @JobyCoding and welcome,

It’s actually possible to use PlayCanvas like that, I worked in the past in a project where we did that.

Any PlayCanvas editor project exports two things:

  • A scene hierarchy .json file
  • An assets folder together with a .json file that includes all asset definitions

Those two files you need to load in your code based project to load the scene with its assets.

To learn how to do that, export a .zip build from PlayCanvas and study how the PlayCanvas loader does it. Mainly the __start__.js file (most likely you will ignore the various CSS styles etc, and head directly where the Application is initialized and the assets/scene are loaded).

1 Like

Thanks! Let me try it out.