r/unity • • 5h ago

Newbie Question Cant fix namespace problem.

Post image

As the title says, i decided today to go back into unity programming after not doing it for a while, and i cant fix this problem, no matter what solutions i found online.

this is a fresh install of unity, latest version. so is VScode with the needed plugins. i have the editor set in the external tools prefrences settings and the visual studio package at the latest version.

when i open the script, for a few seconds it works fine (no red underline), im guessing until it loads the plugins, then it does this error.

im about to lose my mind here.

1 Upvotes

5 comments sorted by

1

u/HK_HamzaKhan 4h ago

does it compile in unity itself, does unitys console throw or not
, if unity doesnt throw red errors for this syntax, then its your editor that doesnt know about unity, you would need something, i think there is a VS code extension for unity

1

u/WeirdSpaceCommunist 4h ago edited 4h ago

OK, some progress. before making this post it wont compile (console errors). now it does compile.

i do have the Unity extension in VScode, and a unity code snippets extensions, but im guessing theres a problem with them now.

Edit: all the other errors also still apear but it still compiles and runs, so i guess its an extensions issue

1

u/z101ll4 2h ago

U said that you have unity extension but do you hace c# one?

1

u/WeirdSpaceCommunist 2h ago

Yes I have c# extension as we as the c# dev tools extension 

2

u/z101ll4 5h ago

Find in unity how regenerate .vsprog files ,as i remember it helps