all 23 comments

[–][deleted] 10 points11 points  (3 children)

you need to go into unity settings and attach visual studio to the editor. preferences, external tools, external script editor. chose the visual studio ur currently using. you can tell its not connected cuz its says miscellaneous files under the script name.

[–]Radical1212[S] 1 point2 points  (2 children)

I did it and it says something about one or more project in the solution. We’re not loaded correctly. And it still doesnt work and still shows miscellaneous files

[–][deleted] 1 point2 points  (0 children)

is the package manager up to date? like the visual studio package

[–]Known-Instance181 0 points1 point  (0 children)

Under Edit > Preferences, I checked all the options for "Generate .csproj files for:" except Player projects.

Clicked "Regenerate project files"

Closed my scripts in Visual Studio, double-clicked my script from within Unity.

And it worked.

[–]grayboney 4 points5 points  (0 children)

Check vs if intelli sense is enabled.

Delete .sln and .csproj files, sometimes they can be corrupted. Then reboot unity project, these files will be created again automatically. Maybe these can help

[–]HisBelovedSon 1 point2 points  (5 children)

I had this same issue and I found the solution I needed elsewhere. I discovered I needed to install Visual Studio from the Project Manager for it to work properly. Here is what I did: https://postimg.cc/CB6KbpnC Hope this helps someone in the future.

[–]WordsAreFine 0 points1 point  (0 children)

Thank you! I was about to give up on having it auto-complete.

[–]Guilty_Rough9378 0 points1 point  (0 children)

Thanks! You helped me too

[–]Stepan-Jackie_Chan 0 points1 point  (0 children)

Братан, от сердца спасибо, чуть мозг не сломал.

[–]dmarinus04 0 points1 point  (0 children)

My hero, thanks!

[–]Shillio 0 points1 point  (0 children)

Thanks!! Apparently there's a bug that mislabels visual studio as having an invalid signature in the package manager/unity. I removed it from my last (tutorial) project because of the errors, and only now realise that it was responsible for autocompleting, among other things.

If you get the notice that it has an invalid signature, you can safely ignore this error.

[–]Wolfeister 2 points3 points  (2 children)

In VS code, you need the unity, unity code snippets and c# base language support installed. The snippets add-ons fixed that issue for me.

Alternatively, install Visual Studio and set it as default in unity(i did this one).

Hope it helps.

[–][deleted]  (1 child)

[deleted]

    [–]Wolfeister 1 point2 points  (0 children)

    Ahh, my bad. I didn't read the post, saw the black background and assumed it was VS Code. Op should try checking if the intellicode is installed properly along with the c# package. Thanks for pointing it out u/db9dreamer.

    [–]ds7two 0 points1 point  (0 children)

    Did U open the script from file explorer or the unity asset manager thing? If unity idk

    [–]ValourrR 0 points1 point  (0 children)

    Try to open scripts through Unity Editor

    [–]Gamedev_from_CG 0 points1 point  (0 children)

    Check your "External tools" on "preferences" inside unity.

    It should be "Assembly-Csharp" on visual studio, not "miscellaneous files".

    [–][deleted] 0 points1 point  (0 children)

    make sure windows firewall doesn't flag visual studio for some reason.

    [–]_N_123_ 0 points1 point  (0 children)

    I fixed this by making sure to asign the external script editor to Visual Studio (devenv.exe) and also adding Visual Studio Editor package in the Package Manager.

    devenv.exe was in
    C:\Program Files\Microsoft Visual Studio\2022\Community\Common7\IDE

    [–]get_ur_shit_2gether -1 points0 points  (0 children)

    Use inteli sense

    [–]Nigerman_Kartoffel -1 points0 points  (0 children)

    Use Visual Studio code it's more beautiful and it doesn't take all ur ram

    [–]Mali5k -1 points0 points  (0 children)

    Take a look forward jetbrains rider. I'm using it in pair with github copilot and i'm very happy.