9092858a58
I updated everything to the latest Unity Editor. Also realized I had the wrong shaders on my hairs, those are fixed and the hairs look MUCH better!
27 lines
724 B
C#
27 lines
724 B
C#
using System;
|
|
|
|
using UnityEngine;
|
|
|
|
namespace Unity.PlasticSCM.Editor
|
|
{
|
|
internal static class GetRelativePath
|
|
{
|
|
internal static string ToApplication(string path)
|
|
{
|
|
Uri relativeToUri = new Uri(ApplicationDataPath.Get());
|
|
Uri pathUri = new Uri(FixVolumeLetterPath(path));
|
|
|
|
return Uri.UnescapeDataString(
|
|
relativeToUri.MakeRelativeUri(pathUri).ToString());
|
|
}
|
|
|
|
static string FixVolumeLetterPath(string path)
|
|
{
|
|
string volumeLetter = new string(new char[] { path[0] });
|
|
volumeLetter = volumeLetter.ToUpperInvariant();
|
|
|
|
return string.Concat(volumeLetter, path.Substring(1));
|
|
}
|
|
}
|
|
}
|