Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Help needed: How can we improve Visual Studio?

Discussion in 'Code Editors & IDEs' started by John_MSFT, Jul 7, 2020.

  1. John_MSFT

    John_MSFT

    Microsoft Employee

    Joined:
    Feb 21, 2018
    Posts:
    118
    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!
     
    Last edited: Jul 9, 2020
    karl_jones and asadmuzammil77 like this.
  2. asadmuzammil77

    asadmuzammil77

    Joined:
    May 31, 2017
    Posts:
    23
    Add all the Good Unity-Specific Features from Jet brains Rider mainly live templates.
     
    John_MSFT likes this.
  3. John_MSFT

    John_MSFT

    Microsoft Employee

    Joined:
    Feb 21, 2018
    Posts:
    118
  4. SlimeProphet

    SlimeProphet

    Joined:
    Sep 30, 2019
    Posts:
    50
    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:

    upload_2020-7-10_11-47-57.png

    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.
     
    John_MSFT and asadmuzammil77 like this.
  5. AlexanderTeaH

    AlexanderTeaH

    Joined:
    Mar 21, 2014
    Posts:
    10
    Would be cool if we could see where a script is attached in the project (e.g. on prefabs, game objects in the scene).
     
    John_MSFT and asadmuzammil77 like this.
  6. SlimeProphet

    SlimeProphet

    Joined:
    Sep 30, 2019
    Posts:
    50
    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.
     
  7. John_MSFT

    John_MSFT

    Microsoft Employee

    Joined:
    Feb 21, 2018
    Posts:
    118
    @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.

    upload_2020-9-3_12-32-16.png

    But you can still do some neat things!
     
    SlimeProphet likes this.
  8. snacktime

    snacktime

    Joined:
    Apr 15, 2013
    Posts:
    3,356
    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.
     
  9. John_MSFT

    John_MSFT

    Microsoft Employee

    Joined:
    Feb 21, 2018
    Posts:
    118
    @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.
     
  10. snacktime

    snacktime

    Joined:
    Apr 15, 2013
    Posts:
    3,356
    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.
     
  11. John_MSFT

    John_MSFT

    Microsoft Employee

    Joined:
    Feb 21, 2018
    Posts:
    118
    @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.
     
  12. mgear

    mgear

    Joined:
    Aug 3, 2010
    Posts:
    9,350
    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