#also, let's make a thread. please post
1 messages · Page 1 of 1 (latest)
here
Once you pick Visual Studio Code in the external tools section, you can click "Regenerate Project Files"
@fallow apex
close VSCode and double click one of your scripts
wait
then it should be working.
also, very importantly: there must be no errors, or the package will not start working correctly
so you won't be able to pick the code editor
If you don't see "Visual Studio Code [1.83.1]" in that list, something is not working
open "External Tools".
That looks good.
Click "Regenerate project files", then close VSCode and reopen it
open script from unity
Click yes.
well, not quite
ok wait
it wouldn't be running any analysis in that screenshot
You know it works if it shows red underlines when you type random stuff
F5?
It shows an error for the first curly brace. But yeah
wait*
It will start when you click "Yes, I trust the authors"
Stop saying wait lol
FUCK
ah, that's the syntax highlighting
In vs code it only does a red one for me when pointing out an error.
it's smart enough to do brace matching even if there is no other analysis
It uses other colors for normal highlighting
I pressed F5 and this is what happened
Ohhhhh, I get it. Of course!
Ah, you started trying to debug the game.
wait
Click this to quit.
Stop saying wait
F5 is a shortcut.
I've been working with Unity for 8 hours, sorry for the brain burn.
you'll have a much easier time once this is working
Can you show me the Console in Unity?
I want to make sure there are no errors right now.
It'll be okay if there are errors once you get your code editor working, but for the first setup, it's important that there are no errors.
You are missing a closing brace.
Even without any code analysis, VSCode can see that you have a { with no }
Select the entire file and press ctrl + /
This will comment out every line of code. That should let Unity compile.
ok
Click cancel. You aren't trying to debug Unity right now.
Don't hit F5. That tries to start the debugger.
I don't know if my debugging thing is working, my head is on fire.
ok
We aren't trying to do that right now.
We are trying to get your code editor to show you your errors.
I need you to follow my instructions.
It will work.
Go back to Unity. Are there any errors in the console?
YES
Do this.
ctrl / just?
Yes. Those two keys, together.
Ctrl A will select all of the text in the file.
you can also just delete all of the code and then put it back later
Do not push F5. We are not debugging Unity.
There's just a mistake as expected
I'll send you the code and you'll fix it and send it back or I'll faint soon.
you just need to let unity compile correctly once
or select all of the code and cut it
and put it somewhere else for now
There should now be no errors in Unity.
You have saved the file again. Now it's back in Unity's folder. Don't do that.
Screenshot the console.
Error still present
ok
I cannot read your mind here. You have to show me what you are seeing.
ok
you need to get rid of that file and not save a new copy
Close VSCode. Go to Preferences, make sure you still have "Visual Studio Code" picked, and click "Regenerate Project Files"
Currently on desktop but not installed in Unity
ok
I did it
@crisp lark
Now double click a script asset to open VSCode.
this means that it couldn't set itself up correctly
I would restart your computer, first.
One of the extensions that was installed is called ".NET Runtime Install Tool"
It is supposed to do this for you
I'm here
Computer
Rebooted
Open
Unity
wait
OH
@crisp lark
I started Studio and it gave no error
AH FUCK
gave
Fuck this shit, I'll rewrite the code.
It gave you this error?
Yes
That won't help with the editor not working.
If this persists, then you will need to click "Get the SDK" and install it manually.
The page should look like this. Pick .NET 7.0
You'll then need to restart VSCode (and maybe your computer). I think it will ask if you want to use the installed SDK
I had to do this because it was not working right on my Macbook.
Downloaded and installed
Computer restart
I started Studio and it gave no error
@crisp lark
I have seen the runtime install extension not work for several people. I wonder if there is a common problem.
Show me a screenshot of it
Great! It's working now.
This only shows up when it's working
now you can move that file back into your project
you can also ask it to format your code for you. push ctrl + shift + p, then type "format" into the menu and hit enter
the ".NET SDK" is software that knows how to run and analyze C# code
Will I be able to see my mistakes?
VSCode needs it so that it can understanad your code
Yes -- you will now see them in the "Problems" window
Normally, the ".NET Runtime Install Tool" extension is supposed to do this for you
But it wasn't working for some reason
maybe it was having trouble connecting
.
It is at the bottom
Clicking that will also open the Problems window
okay
ok
YESSSSSSSSS
FUCKKK
YESSSSSSS
AĞAĞAĞAĞA
x:dsaDSA
I LOVE YOU DUDE
BRO
DUDE I LOVE YOU

❤️
you're welcome
ty
