Is there any plan to support Typescript in the editor?

I know the [PlayCanvas-Sync], but it’s so hard to use…

Hi @fftidus,

I don’t know if there is planned support for TS in editor, but feel free to open a feature request in the editor repo about it.

There have been discussions around adding Typescript support but no concrete plans yet.

What issues are you running into? It would be great to know so that we can improve the documentation and feature set of playcanvas-sync.

In the meantime, you can use Typescript locally on your PC and either manually transfer the built file to the Editor manually or use the REST API to update the built JS file as part of your build process:

1 Like

For me, it’d be nice to have an up to date template on a project that has some TS build + PlayCanvas sync already hooked up. I know there’s a zillion ways to compile your TS, but it’d be nice to just have something ready to go with an opinionated solution and directory structure, where I could start writing some TS.

I found these projects, but it’s hard to know what’s relevant, up to date, or even works with the current version of PlayCanvas:

1 Like

Yes, we definitely should. We are way overdue on a manual page on setting playcanvas sync for the typical workflows that people tend to use.

Ticket created:

1 Like

Awesome. And even beyond a manual page, I think having a pretty bare-bones github repo that people could just clone and have it start working right away would be amazing.

Just like a super simple repo with maybe a package.json and a pcconfig.json file in it, a folder with a Hello World script component in TS, and an npm run watch to automatically build the TS into a bundle and upload it with pcwatch whenever something changes.

Ideally the setup flow would be as simple as:

  1. Start a new blank project in the playcanvas editor
  2. Clone this repo and run npm install
  3. Follow instructions to fill out the pcconfig.example.json in the repo
  4. Run npm run watch
  5. Click on a box in the playcanvas editor and attach the HelloWorld script to it
  6. Hit launch and see the hello world message
  7. Change the message in the local repo
  8. Hit refresh and see the new message automagically