So in VS2015 Community I work with .shader files. I use the Hotkey CNTRL+K+C to comment code quickly. The problem is when I highlight multiple lines and perform the action it does the following:
struct v2f
{
/* float2 uv : TEXCOORD0;
UNITY_FOG_COORDS(1)
floa*/t4 vertex : SV_POSITION;
};
Instead of:
//struct v2f
//{
// float2 uv : TEXCOORD0;
// UNITY_FOG_COORDS(1)
// float4 vertex : SV_POSITION;
//};
I’ve researched a bit about this before but still cannot find a great solution. I have the Tools for Unity extension enabled and have even tried the Shader extension that is available through the Extensions and Updates. They still perform the same way.
I know if I highlight ENTIRE lines I won’t have this issue but that is not the point. I’m trying to get comments to work just like editing .cs files. You can highlight parts of lines and the entire line will comment out correctly using the double slashes.
My last attempt I even set up a custom extension and told it to act like c# through the Tools->Options->Text Editor->File Extensions setting. The problem with this is it makes the entire experience like c# which means I get all sorts of Syntax error highlights as you would since it isn’t a valid .cs format.
Has anyone come across this and fixed it??
Thanks,
- Jeffrey A Voigt