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

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