I am currently trying to publish a build, but am running code that requires an older version of PlayCanvas. While launching from the editor, we follow the instructions by adding
?use_local_engine=https://code.playcanvas.com/playcanvas-1.22.0.js, which works just fine. However, if we try to append this to our published URL, it fails to work and loads the latest version of PlayCanvas, as proven by the console output line:
Powered by PlayCanvas 1.33.1 b6a8512
Is there a way to publish a build using a specific version of the PlayCanvas engine? Thanks so much in advance!
Unfortunately, you will have to self host if you need a specific version of the engine.
Once you have exported the build, you can swap the engine file.
Thank you for the quick clarification, yaustar! We were able to export a build and swap out the engine file successfully to get this working on our own server.
Would you elaborating on why you need to use an older version of the engine?
Of course! We built a framework on the engine about two years ago using a template project that another member of the community had done to enable development using TypeScript / WebPack. When revisiting our codebase this past month to put together another demo using the same framework, we noticed that the PlayCanvas engine had apparently gone through a number of changes over the past two years that rendered many of our TypeScript definitions obsolete. We also noticed there’s now an official way to build up-to-date definitions, but the work necessary to get our code up and running again was too cumbersome at the moment.
At any rate, we look forward to seeing official documentation on how the PlayCanvas team recommends developing with TypeScript, including project setup, etc.!
We have playcanvas-sync that now helps with handling a local editing workflow: https://github.com/playcanvas/playcanvas-sync
The NPM module of playcanvas now also includes the typescript definitions: https://www.npmjs.com/package/playcanvas
We don’t yet have a TypeScript example using this workflow yet but this hello world webpack example may help: https://github.com/playcanvas/playcanvas-webpack
Awesome, thanks a ton for taking the time to share these links!