Help needed: How can we improve Visual Studio?

I’m the Program Manager of Visual Studio Tools for Unity team at Microsoft. I’d love to chat with you about your experience working with Visual Studio and Unity so we can make the tooling better. It will be a casual conversation and there is no need to prepare in advance.

If you’re willing to schedule a brief chat with me to answer some questions and share your experience please send me a message on here or reply to this thread. Thank you!

2 Likes

Add all the Good Unity-Specific Features from Jet brains Rider mainly live templates.

1 Like

Thanks for the feedback! What limitations did you run into with Visual Studio Snippets?

It’d be neat if VS indicated when a serialized member field’s value was overridden in the inspector. Apparently Rider does this? Here’s a screenshot I found that demonstrates it:

Here, it uses a little Unity icon to let you know that the default values set in the script have been changed in the Unity Editor, and it even tells you what value has been set for the different prefabs that use the script.

2 Likes

Would be cool if we could see where a script is attached in the project (e.g. on prefabs, game objects in the scene).

2 Likes

This is probably insane, but for all I know it’s trivial: I’ve been having fun practicing C# with the C# Interactive window in Visual Studio. Wouldn’t it be great if you were able to use parts of Unity’s API as well? I understand this doesn’t make sense for most of the API, but it’d be handy to test calculations from the various math classes, e.g., Mathf, Vector2, Vector3, Color, Gradient, UnityEngine.Random…

If this would require more than a couple days, then it’s almost certainly not worth doing. I doubt anyone would use it very much. But if it’s something as simple as telling VS where to find the Unity namespaces, then why not.

@SlimeProphet , thanks for sharing! You can get some support for that scenario if you right-click on the Assembly-CSharp project in the Solution Explorer and click Initialize Interactive with Project.

Although, there are some things that will continue to not work because the Unity API methods make external calls - which is a security limitation here not unique to Unity projects.

But you can still do some neat things!

1 Like

The policy to not allow downgrading community edition you could change that. The chances of VS breaking between VS/Unity versions is far higher then in a standalone context. And how it breaks can be dramatically bad. Like we have to restart VS after every file add/remove right now in 2020.1 with the latest VS community.

@snacktime I’d like to know more about the issue you’re having where you have to restart after every file add/remove. That sounds like you could be hitting an issue in an older VS Editor package. To confirm, make sure you have 2.0.2+ installed via Unity Editor > Windows > Package Manager > Visual Studio Editor.

No it’s the most recent of everything that is the issue. Unity 2020.1, VS 16.7.X, editor package 2.0.2. Unity is stepping all over VS when a solution reload is triggered causing VS to get into unrecoverable states about half the time… Unable to close files or VS itself as VS thinks things are already closed. And the worst editing will sometimes stop saving. No asterisk next to the filename but otherwise looks normal except nothing is actually being saved.

@snacktime yikes! Can you log via Help > Report a Problem? Otherwise, I’d love to connect and get more details from you. Please send me a message if you’re willing to chat further about this.

here’s my current random list (havent really checked if some of those can be fixed with plugins or settings…)

UI/UX

  • show matching braces on mouseover? because selecting the { doesnt, only shows matching if place cursor before the brace… (not intuituve?)
  • when mouseover the last closing brace for if-else, tooltip shows the else part only, not the if part

BUG

  • if you generate field to another class, and its last variable is inside #if unity_editor, the generated field goes inside those condiditionals (which then breaks things if try build)

WORKSPACE

  • if i work in unity and on wpf projects, for WPF i need solution explorer and few other windows, for Unity i dont (but too much work to always enable disable them)

AUTOCOMPLETE

  • when will vs start learning from my code? if i have typed the same line of code +100 times, it should know how to better complete/predict it? (even few or more lines after it… not sure if would get annoying though, it should know the context a bit, instead of offering big autocomplete everywhere)
  • autocomplete gets on the way when manually replacing many vars in many rows (one by one), have to press esc to hide it every time (maybe somehow it could notice that i’m doing this manual repetive task right now?)
  • autofix common typos when typing: like flase > false *especially if boolean is expected for that line you are in
  • option to autofix missing ; from end of line
  • if copy paste insert some method into many rows one by one, like add this inside the line: “DoThings(”, then it could automatically close the “)” before “;” char