Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice
  3. Join us on November 16th, 2023, between 1 pm and 9 pm CET for Ask the Experts Online on Discord and on Unity Discussions.
    Dismiss Notice

Visual Studio Shader extension

Discussion in 'Assets and Asset Store' started by MODev, Mar 17, 2015.

  1. MODev

    MODev

    Joined:
    Jul 30, 2013
    Posts:
    229
    Hi, probably most of you noticed that Unity shaders have no good editor with cg language support. Because of that and because I'm working on shaders(so long at my job and personal projects) I've made extension for Visual Studio 2013. Extension is free and downloadable from VS Gallery: https://visualstudiogallery.msdn.microsoft.com/ed812631-a7d3-4ca3-9f84-7efb240c7bb5 .
    Tool mostly supports highlighting and code completion but in future I'm going to improve it. As always good advices from tool users may help me a lot with this:)
     
    LKSFX, yuliyF, StaticClass and 3 others like this.
  2. MagicZelda

    MagicZelda

    Joined:
    May 1, 2013
    Posts:
    90
    just downloaded ty looks good at first glance :)
     
  3. MODev

    MODev

    Joined:
    Jul 30, 2013
    Posts:
    229
    New update has come: 1.02, whats there:
    -fixed some incompatibility problems while using another shader code completion/highlight tools
    -non-case sensitive search so you will get more code completions in context menu
     
  4. StaticClass

    StaticClass

    Joined:
    Jan 31, 2014
    Posts:
    12
    Thank you. This is awesome.
     
  5. chronos78

    chronos78

    Joined:
    Dec 6, 2009
    Posts:
    154
    Awesome extension, thanks. Could you please make a version that also supports syntax highlighting of .cginc files as well.
     
  6. MODev

    MODev

    Joined:
    Jul 30, 2013
    Posts:
    229
    Hi, I've updated tool and added some new features:
    1.03
    -keywords highlighting
    -better code completion
    -supports cginc
    -code completion in .shader for opened .cginc files
    -braces matching
     
  7. Reanimate_L

    Reanimate_L

    Joined:
    Oct 10, 2009
    Posts:
    2,785
    @MODev can you add support for .compute extension?
    Also Global Shortcut are not working when opening shader files
     
    Last edited: Sep 9, 2015
  8. MODev

    MODev

    Joined:
    Jul 30, 2013
    Posts:
    229
    Sure I'll add in next release
     
  9. MODev

    MODev

    Joined:
    Jul 30, 2013
    Posts:
    229
    Release 1.04 is release is enabled:
    -mostly some issue fixes
    -highlighting *.compute files
     
  10. Reanimate_L

    Reanimate_L

    Joined:
    Oct 10, 2009
    Posts:
    2,785
    @MODev : Don't forget Global shortcut not working, i can't comment lines without global shortcut :)
     
  11. Lex-DRL

    Lex-DRL

    Joined:
    Oct 10, 2011
    Posts:
    139
    I see no code completion. Only syntax highlighting.
    Is there some special stuff I need to do to make it work?
    I've just launched the downloaded installer, VS installed it - and that's all.
     
  12. Brainswitch

    Brainswitch

    Joined:
    Apr 24, 2013
    Posts:
    270
    Any chance for 2015 support?
     
  13. MaT227

    MaT227

    Joined:
    Jul 3, 2012
    Posts:
    628
    This seems to be an awesome tool, I need to try it out. I don't know why Unity doesn't support those features by default...
     
  14. MODev

    MODev

    Joined:
    Jul 30, 2013
    Posts:
    229
    Hi! After long absence Visual Studio 2015 is supported by my extension:)
    Code completion is after writing 3 signs of word and than using ctrl + space(default shortcut for code completion)
     
  15. dpolyakov

    dpolyakov

    Joined:
    Dec 18, 2015
    Posts:
    16
    Hi, thanks for a very nice extension!

    Would it be possible to:
    - fix: coloring in comments (it does not apply comment color on keywords, like "Blend, Properties, SubShader, Pass and so on)
    upload_2016-5-14_14-2-40.png

    - add: color options, like in nshader.
    upload_2016-5-14_14-3-22.png
    so I will be able to highlight like this:
    upload_2016-5-14_14-5-51.png
     
  16. MODev

    MODev

    Joined:
    Jul 30, 2013
    Posts:
    229
    Good idea:) If I find time I'll add those features
     
  17. zngb

    zngb

    Joined:
    Aug 5, 2015
    Posts:
    20
    Hello. Does this add-on also handle proper indentation?

    I'm having trouble with bad indentation on some blocks.
    sadindent.png
    At first I thought that it's because I'm using VsVim, but also when it's disabled the indentation is bad.
    Tried differnet settings of 'Tabs' in the options text-editor menu, but obviously I'm doing something wrong :(
     
  18. MODev

    MODev

    Joined:
    Jul 30, 2013
    Posts:
    229
    Hmm thats look strange, maybe you have some custom settings for C++ language? Because I import some settings from that data.
     
  19. tsangwailam

    tsangwailam

    Joined:
    Jul 30, 2013
    Posts:
    280
    Any chance for visual studio code support?