What you will get from this page: Handy tips to help you be more productive when using Microsoft Visual Studio or Visual Studio for Mac as the code editor for your Unity projects. Visual Studio and Visual Studio for Mac come with a suite of tools for Unity, including IntelliSense support for Unity API messages, debugging and inspecting features, the Unity Project Explorer, and Attach and Play. Thanks to John Miller from Microsoft who provided these tips in his Unite Copenhagen session.
Dec 11, 2018 If your Visual Studio IntelliSense is malfunctioning due to one of those, this might be just what you need. Workaround #4: Verify Some Specific Visual Studio Configurations. If all of the above didn’t work, it’s time to verify some configurations in Visual Studio itself. Go to Tools - Options - Text Editor - All Languages - General. IntelliSense might be unavailable. Set environment variable TRACEDESIGNTIME = true and restart Visual Studio to investigate. I try to disable IntelliSense but it doesn't work,i find maybe it is caused by the project being moved,so i want to get some suggets here. Expected behavior.
Update Visual Studio
- For some poeple unloading and loading project is not working. For me, currently I'm creating my scripts inside Visual Studio via Unity Project Explorer window( View - Unity Project Explorer) which sees the script as a part of the solution.
- For your additional information, ‘IntelliSense’ sometimes referred to as code completion or code assists as well. Before diving into the steps, here are the versions of the tools that I am using in this article. Unity - Version 2019.3.15f1; Microsoft Visual Studio Community 2019 - Version 16.7.1.
- Oct 25, 2019 Visual Studio Tools for Unity is a free Visual Studio extension that turns Visual Studio into a powerful tool for developing cross-platform games and apps with Unity. While the Unity editor is great for putting your game world together, you can't write your code in it.
This is an obvious but important reminder that you can update Microsoft Visual Studio independently of the version of Unity you’re on, without breaking things in your project. The latest version of Visual Studio always provides performance improvements on both Windows and Mac that save you valuable time. It's super simple to update; you can see how it’s done in this image.
You can avoid costly delays that come with cold launching Visual Studio by simply leaving the editor open. It will continue to synchronize your changes as you operate back and forth between Visual Studio and the Unity Editor.
Reduce load time
You can save some loading time by unchecking the box “Restore Solution Explorer project hierarchy state on solution load.” However, if you want to expand all your folders when you launch your solutions so as to write to the file you had open the last time, then don't uncheck this box.
Save time with keyboard shortcuts
Use CTRL+T (Windows) Shift+CMD+F (Mac) to search your entire project for anything.
Work faster with Unity APIs
You can access Unity documentation directly from within the Visual Studio editor on Windows and Mac. To do so, highlight the Unity function you want to know more about. Then you can either go to Help > Unity API Reference or use keyboard shortcuts Ctrl+Alt+M, Ctrl+H or Cmd+' to launch your browser either inside the integrated development environment (IDE) or externally.
If you have a long file with a lot of code, it can be super helpful to customize the fonts and colors of Unity API methods for quick identification.
Navigate easily with Unity Project Explorer
The Unity Project Explorer improves upon the older Solution Explorer view with a cleaner layout that maps to your project folder view in Unity. This makes it easier to navigate between Unity and Visual Studio.
Visual Studio Unity Intellisense Tutorial
On Windows, with Visual Studio 2019 the Project Explorer is on by default. To enable it with older versions, go to View > Unity Project Explorer or hit Shift+Alt+E. On Mac, the Project Explorer is displayed by default. If you use both Solution Explorer and Project Explorer, you can see a synchronized view of your files.
Debug faster with Attach and Play
Instead of clicking Attach to Unity and then switching to Unity to press Play, you can use the Attach to Unity and Play configuration to make it a one-step operation. This will attach the debugger and play Unity; you don’t have to leave the IDE, thereby speeding up your debugging workflow.
Visual Studio Unity No Intellisense
Use IntelliCode
IntelliCode is the AI-powered and machine learning model for improving IntelliSense. Intellicode saves you time by listing auto completion suggestions in an order based on what you’re most likely to use. To use it, open a project in Visual Studio, open Intellicode, and choose the option “Train Intellicode” (in VS 2019; in VS 2017, IntelliCode is a separate extension that can be installed from the Visual Studio Marketplace). It will then generate a model based on the open project; using those learnings it can provide suggestions for other projects. In his session, John talks about how he used the Unity FPS sample project to show what’s possible with IntelliCode.
Collaborate better with Live Share
This last tip is a good one for collaboration. Click “Live Share” to generate a link to parts of your code that you can then share with anyone that has Visual Studio or Visual Studio Code installed. A sharing session is created between you and your collaborators, allowing them to see your code without having to install anything except for the editor.