#also, let's make a thread. please post

1 messages · Page 1 of 1 (latest)

crisp lark
#

here

#

Once you pick Visual Studio Code in the external tools section, you can click "Regenerate Project Files"

late delta
#

@fallow apex

fallow apex
#

.

#

yes

crisp lark
#

close VSCode and double click one of your scripts

fallow apex
#

wait

crisp lark
#

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

fallow apex
crisp lark
#

If you don't see "Visual Studio Code [1.83.1]" in that list, something is not working

crisp lark
fallow apex
#

True?

crisp lark
#

That looks good.

fallow apex
#

nice

#

:d

crisp lark
#

Click "Regenerate project files", then close VSCode and reopen it

fallow apex
#

ok

#

ok

#

yes

#

And then?

late delta
#

open script from unity

fallow apex
crisp lark
#

Click yes.

fallow apex
#

Which one?

#

ok

nova imp
#

It works!

#

It says you have mismatched curly braces btw

crisp lark
fallow apex
#

ok wait

crisp lark
#

it wouldn't be running any analysis in that screenshot

#

You know it works if it shows red underlines when you type random stuff

crisp lark
fallow apex
#

OK

#

WAİT

#

ok wait*

nova imp
fallow apex
#

wait*

crisp lark
nova imp
fallow apex
#

FUCK

crisp lark
fallow apex
#

notü

#

not working

nova imp
crisp lark
nova imp
#

It uses other colors for normal highlighting

fallow apex
#

I pressed F5 and this is what happened

nova imp
crisp lark
fallow apex
#

wait

crisp lark
#

Click this to quit.

nova imp
crisp lark
#

F5 is a shortcut.

fallow apex
crisp lark
#

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.

fallow apex
#

...

fallow apex
crisp lark
#

You are missing a closing brace.

#

Even without any code analysis, VSCode can see that you have a { with no }

fallow apex
crisp lark
#

Select the entire file and press ctrl + /

This will comment out every line of code. That should let Unity compile.

fallow apex
#

ok

crisp lark
#

It will look like this.

#

Unity should show a box for a few seconds as it compiles.

fallow apex
#

What is this?

crisp lark
#

Click cancel. You aren't trying to debug Unity right now.

#

Don't hit F5. That tries to start the debugger.

fallow apex
#

I don't know if my debugging thing is working, my head is on fire.

crisp lark
#

We aren't trying to do that right now.

#

We are trying to get your code editor to show you your errors.

fallow apex
#

Please allow me to broadcast for two minutes.

#

just

#

2 minutes

crisp lark
#

I need you to follow my instructions.

#

It will work.

#

Go back to Unity. Are there any errors in the console?

fallow apex
#

YES

fallow apex
#

Eror

fallow apex
#

ctrl / just?

crisp lark
#

Yes. Those two keys, together.

fallow apex
#

Is there a plus?

#

okey

#

okay

crisp lark
fallow apex
#

I do what you say but nothing happens

#

Wait 2 minutes

crisp lark
#

you can also just delete all of the code and then put it back later

fallow apex
#

I made a video

#

wait

#

downland

crisp lark
#

Do not push F5. We are not debugging Unity.

fallow apex
#

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.

crisp lark
#

Drag the file out of your project entirely

#

put it on the desktop

fallow apex
crisp lark
#

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

fallow apex
#

ok

#

I threw the code on the desktop

crisp lark
#

There should now be no errors in Unity.

fallow apex
#

It's still the same

#

ok

#

wait

crisp lark
fallow apex
#

no no

#

wait

#

There's a comma missing somewhere

crisp lark
#

Screenshot the console.

fallow apex
#

Error still present

fallow apex
crisp lark
#

I cannot read your mind here. You have to show me what you are seeing.

fallow apex
crisp lark
#

You saved the file.

#

That made a new copy in the project again.

#

Delete it.

fallow apex
#

ok

crisp lark
#

you need to get rid of that file and not save a new copy

fallow apex
#

Okay

#

delete

#

file

#

no eror

#

But my file is gone

crisp lark
#

Close VSCode. Go to Preferences, make sure you still have "Visual Studio Code" picked, and click "Regenerate Project Files"

fallow apex
#

Currently on desktop but not installed in Unity

crisp lark
#

Now double click a script asset to open VSCode.

fallow apex
#

I clicked on another code in Unity

crisp lark
#

this means that it couldn't set itself up correctly

fallow apex
#

@crisp lark

#

and then?

crisp lark
#

I would restart your computer, first.

fallow apex
#

You here?

#

ok

#

wait

crisp lark
#

One of the extensions that was installed is called ".NET Runtime Install Tool"

#

It is supposed to do this for you

fallow apex
#

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.

crisp lark
fallow apex
#

?

#

?

#

What is this??

crisp lark
#

You pushed F5 again. It tried to start debugging Unity.

#

Click Cancel.

fallow apex
#

ok

#

Let me write the code again and if there is an error, I will get back to you

crisp lark
#

That won't help with the editor not working.

crisp lark
#

The page should look like this. Pick .NET 7.0

fallow apex
#

ok

#

downlad

crisp lark
#

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.

fallow apex
#

Downloaded and installed

#

Computer restart

#

I started Studio and it gave no error

#

@crisp lark

crisp lark
#

I have seen the runtime install extension not work for several people. I wonder if there is a common problem.

crisp lark
fallow apex
crisp lark
#

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

fallow apex
#

Now can you tell me what I installed and what I did?

#

My head burned

crisp lark
#

the ".NET SDK" is software that knows how to run and analyze C# code

fallow apex
#

Will I be able to see my mistakes?

crisp lark
#

VSCode needs it so that it can understanad your code

#

Yes -- you will now see them in the "Problems" window

crisp lark
#

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

fallow apex
#

Where

#

Problems

#

Window

crisp lark
#

ah, sorry, here's a better view

fallow apex
crisp lark
#

It is at the bottom

fallow apex
#

okay

#

ok

#

İts true?

crisp lark
#

Clicking that will also open the Problems window

fallow apex
fallow apex
#

ok

#

YESSSSSSSSS

#

FUCKKK

#

YESSSSSSS

#

AĞAĞAĞAĞA

#

x:dsaDSA

#

I LOVE YOU DUDE

#

BRO

#

DUDE I LOVE YOU

crisp lark
#

There we go.

#

Now take a break :p

fallow apex
#

❤️

crisp lark
#

you're welcome

fallow apex
#

ty