com.unity.ide.visualstudio@1.0.2

# Code Editor Package for Visual Studio

## [1.0.2] - 2019-01-01

### This is the first release of *Unity Package visualstudio_editor*.

Using the newly created api to integrate Visual Studio with Unity.
This commit is contained in:
Unity Technologies
2019-01-01 00:00:00 +00:00
commit f31b3f54a7
31 changed files with 1883 additions and 0 deletions

35
Editor/Utility.cs Normal file
View File

@@ -0,0 +1,35 @@
namespace VisualStudioEditor
{
public static class Utility
{
public static string FileNameWithoutExtension(string path)
{
if (string.IsNullOrEmpty(path))
{
return "";
}
var indexOfDot = -1;
var indexOfSlash = 0;
for (var i = path.Length - 1; i >= 0; i--)
{
if (indexOfDot == -1 && path[i] == '.')
{
indexOfDot = i;
}
if (indexOfSlash == 0 && path[i] == '/' || path[i] == '\\')
{
indexOfSlash = i + 1;
break;
}
}
if (indexOfDot == -1)
{
indexOfDot = path.Length - 1;
}
return path.Substring(indexOfSlash, indexOfDot - indexOfSlash);
}
}
}