Script editor troubles

Script editor troubles


I’m just getting started with cocos and I’m having trouble with the script editor. I get a warning when trying to open up any script, it reads “Unconnected script editor, whether an external script editor is set up immediately within the preferences setting”. I can’t seem to edit or create any new scripts for games. I also had a message when initially installing Visual Studio that read “The following IDs could not be installed… “Component.Cocos”: no matching workload or component found.”

I’ve tried installing and updating the vscode extension in the developer tab in cocoscreator, but that didn’t have any effect. And I’ve been trying to see if there’s a solution online but so far I haven’t found anything, is there a known solution to this issue that anyone could share with me?

Yes, you have to configure an external program’s path to open it up directly from Cocos Creator like that. Under File -> Settings -> Data Editor -> External Script Editor -> Browse (Select webstorm64.exe or whatever external editor you wish to use).

What most of us do is the other way around: use something like Visual Studio Code, JetBrains Webstorm, Sublime Text, etc. (whatever editor), and point it to your resources/scripts folder, writing all your code with those programs as you would for any other project, and only using Cocos Creator insofar as it is detecting those scripts, and for running them.

Right, I did that before. But it turns out the problem was that I didn’t have Visual Studio Code downloaded (I thought it would be downloaded automatically with Visual Studio). Once I had that downloaded though I was able to connect it to the data editor as you mentioned.

same here. why Component.Cocos can not be found? in fact I have already installed it.
when build for android, do we need it or not?