Defold Kit — Visual Studio Code Extension

I must be doing something wrong. How do I get the setup to “kick off”. It says open a defold project. But how? I opened my folder. Then I tried opening the game.project file and it just loads the file…no setup kicked off.

Edit: Finally got it work. I had to close VS Code. Then open folder. Wait a few seconds and the setup routine popped up in bottom right.

Yeap, it requires to open the project folder with the ‘Open the folder’ command.

Snippets have been improved a bit. I’ve been wanting to add automatic annotations for script lifecycle functions for a long time.

Just by typing script:

It’s also possible to add functions individually, but then still need to declare a class.

6 Likes

Hello @astrochili!

I’m trying your extension - First time using VSCode too (coming from Sublime or other IDEs) - Upon installing, not only the Setup didn’t run but I can’t even seem to load the commands.

Any clues?
Thanks!

be sure you use ‘Open Folder…’ on the one containing your game.project

2 Likes

Yes, make sure you open the project folder as @ekt mentioned, not a separate file.

1 Like

Hi!

I’m using the Defold editor. This looks like a nice extension. I have a question though, sorry for my noobiness : what is the workflow when using VS Code? In the Defold editor, I can create game objects and components and connect them together easily. Or manipulate atlases. I know these are text files only but they are easy to manipulate in the Defold editor.

How is this handled when using VS Code? I believe we cannot have both editors open at the same time. So what is the workflow?

Thanks!

Hi,

External code editors like VSCode can’t replace the collection or gui structure building at the moment (and hardly ever). It’s for coding and editing raw files.

When someone uses an external code editor - most often they use it to write code and everything else in the Defold Editor. This is especially true when content is instantiated from code rather than from pre-prepared collections.

1 Like

Ok! That’s what I understood. But I’m mainly curious about the typical workflow. For example, I imagine you’d create all game objects and components and general structure using Defold and only then use VS Code for scripts. It’s just we very often need to bounce from code to Defold “UI elements” and back. Wondering if the process is seamless. Might give it a try though. If we can have both editors open at the same time it’s no big deal. But I am not sure if we can!

Of course we can, there’s no doubt about it.

1 Like

Ok! Thanks!

Thanks I wasn’t expecting I needed to be in a project to install the kit.

Got it working now :slight_smile: Thanks!