The Unity Scripts edited in Visual studio don't provide autocomplete...2020 - c#

just like the title Unity Scripts edited in Visual studio don't provide autocomplete. i am trying to make a rigid body and as you can see it doesn't recognize it, some help? By the way i can't change the "External script editor" to something else but "open file by extension:

Your installation of Visual Studio is probably missing the Visual Studio Tools for Unity extension.
Try this installation guide: Get started with Visual Studio Tools for Unity

There is a previous forum that provides guidance on this issue which is still relevant in 2021:
Unity Scripts edited in Visual studio don't provide autocomplete
One solution that worked for me that was not in that forum was going to the Solution Explorer tab in Visual Studios. Right click the solution and hit resolve errors. This may fix the issue.

Related

Unity referances not working Visual Studio 2022

As seen in the image bellow, references are not showing up in visual studio.
I was just using visual studio and i closed the project opened some other project and opened the unity project again in visual studio.
But then none of the references shows up and i cant really fix it.
Any ideas on how to fix this?
In Unity Editor try:
Edit -> Preferences... -> External Tools -> Regenerate project files
This problem happened to me, I couldn't solve it, I reinstalled visual again and downloaded c# plugins and module so it worked
The code pair may not be able to compile due to not referencing the relevant library files and namespaces

Not getting autcomplete for Unity in Visual Studio 2019

I know this has already been addressed many times, but really I have tried everything that I found and I just can't get the autocomplete to work. I first tried VS Code but I could not get it to work, then I opened Visual Studio and tried everything I found in different forums but nothing.
I have already tried:
Downloading Unity tools for Visual Studio
Regenerating project files
Setting Visual Studio as preference in Unity.
Redownloading Visual Studio.
I think I may have missed something in the External tools window, but I am not sure about what.
External Tools Window
My editor with the file structure

Why is Visual Studio not displaying correct autoCompletion suggestions

I am using Unity with Visual Studio Code. However, VS Code is not giving me correct autocompletion suggestion. Below is a snippet of what it displays
Once I select any of the suggestions, I am getting this :
Anyone ever experienced the same? How can I get correct suggestions.
In Visual Studio: Tools -> Options -> Intellicode set to C#
In Unity: Edit -> Preferences -> External Script Editor, link up your Visual Studio
If you need go to the tools move to the options and then set the lang to C#
And also you have to link up your Visual Studio to the unity software
You can do that by going to the
Edit - preferences and external script editor the you can link up your visual studio

Unity solution not compatible with visual studio

Since updating to the most recent version of Unity 5.4.0f3, whenever I doubleclick on a script, it launches both Visual Studio and Monodevelop, but I get an error saying that the this version of VS (Community 2015) is unable to open my project. Monodevelop displays it's own, somewhat less clear error message. Please see the screen shots below.
I can still manually open my script using Visual Studio's file menu, but the intellisense code completion no longer works. Anyone know how to fix this? I have Visual Studio's Tools for Unity installed.
I was having similar issues when doing a clean download of an existing Unity project onto a fresh install of Visual Studio Community 2019.
In the end the issue for me was that, although the correct version of VS Tools for Unity was installed, it was 'Disabled' by default in VS's Manage Extensions dialog (Extensions -> Manage Extensions). Just had to click 'Enable', restart Visual Studio, and all worked as expected again.
Turns out it was an issue with my existing install of Visual Studio Tools for Unity (VSTU).
I found a thread where users had experienced similar problems due to an unsupported version of VSTU running on Unity5.2 and beyond. Unity 5.2+ requires VSTU 2.1 or later for VS to work correctly with Unity, more information for anyone interested is available in the documentation here.
I had VSTU 2.3 installed, but removing and reinstalling VSTU resolved the issue, so there must have been a problem with my install. If anyone else has this or a similar issue you can download the latest installer for VSTU here. Thanks to all who chimed in your responses helped me look in the right place!
Please try following steps:
Delete old *.csproj and *.sln files on project's root folder
Check "Edit > Preferences > External Tools" and make sure you've selected "Visual Studio"
Re-open solution by "Assets > Open C# Project" menu
For me it was enough to right click the solution in Solution Explorer and run "Resolve errors".
I will complete what is said above. I experienced this issue today and it took me a while. In my case it was relative to a new install of the Unity Editor.
For some unknown reason the unity tool used on VS (intellisense) was uninstalled. I had to reinstall this : open Visual Studio Installer, select your project and reach the Gaming section where reside the tool for Unity.
The extension "Visual Studio 2019 Tools for Unity" seems no longer available for download via the extension manager. Luckily I recalled that I saw some game development features in the Visual Studio installer, so I picked that one:
It works for VS 2019 (16.11.11) and VS 2022 (17.2.0 Preview 1).

Visual Studio 2015 is not auto completing Unity keywords

I've installed Visual Studio 2015 and Visual Studio 2015 Tools for Unity and I had no problem in using Visual Studio as my default editor in Unity, however I've noticed that Unity's keywords and methods do not auto complete, only the VS do.
For example: GetComponent<>, or OnGui() and Input.GetMouseButton, these are specifically from Unity, when I was using MonoDevelop it displayed the available options of methods when I was typing Input.GetMouse... and if I clicked CTRL + Space it auto completed.
I would like to know if is there any way that I can make Visual Studio recognize Unity API.
Since I am new in Unity and C# I don't know if this is a default behavior, if I should set up something to enable this auto complete feature or if something is wrong and it should be working and somehow it is not.
I would appreciate any help.
Thanks in advance.
Import Unity VS Tools' package into unity, open visual studio and use Ctrl-Shift-Q to call Quick MonoBehavior Wizard
Configure Shortcuts: http://unityvs.com/documentation/shortcuts/
Good luck

Categories

Resources