ChatGPT PlayCanvas Integration

We’ve been working on a proof-of-concept integration of ChatGPT directly into PlayCanvas. Possible next steps would be:

  • Generate Script button in the entity inspector to create and attach a fully functional script via text-prompt (for example, “Move this entity forward when the player presses the ‘W’ key”).
  • Edit Script button to edit existing scripts via text-prompt (for example, “Also move when the player presses the ‘Up’ key”).
  • Automatically feeding knowledge of the existing project to the GPT assistant, so it can answer questions about the project.

What do you think? :slightly_smiling_face:

GPT_PC_PoC_Public

7 Likes

Looks cool!

Although, I think it would be nice to have the panel in the Code Editor, where you actually write code. Something like Cursor editor does it.

Would definitely be cool to have it directly support coding as well!

We think this could be really useful for artists / tech-artists working with the engine, who don’t write any code. Especially, if it is able to create scripts on its own in the future. Thus our PoC is currently also focused on the editor itself, rather than the code editor.

2 Likes

I hope it will :slight_smile: Because today AI is definitely not at the level, where it can create scripts on its own that work. I mostly use it to quickly generate a function that does something, like finding a point on a circle, given a radius, etc. Even then I have to verify the contents with understanding each line. He is like a newbie coder I am pared with in a pair programming, with me being an observer.

1 Like

This looks promising @Sam_RDX.

Also, one of many, but I’ve been looking at this mendable.ai, which is tuned to your specific API/documentation. The integration looks quite slick too Mendable InPlace Component - Docs and links directly to docs etc aswell as recommending code.

There’s not really an api to trigger actions like create scripts etc, but that’s probably a good thing.

1 Like

@Mark_Lundin thanks for the link + suggestion. Will definitely also look into that :slightly_smiling_face:

I think you can actually also do something very similar with GPTPlus where you can upload resources to create a custom GPT, which will then analyze those resources for its answers.

I think it would be very interesting to have a plugin for PlayCanvas which automatically uploads your project scripts etc. to the AI agent, so it can answer your project specific questions with the resources already available in your project, similar to what mendable proposes.

1 Like

yeah thats an interesting use case I’d not considered. I was initially thinking of a bot simply trained on PlayCanvas API, but something actually aware of your own scripts and project would be pretty useful! The number of times I’ve come back to a project after a few months of not working on it, having a way to get a quick synopsis would be amazing :fire:

2 Likes