A game about forced loneliness, made by TACStudios
1using System; 2 3using UnityEngine; 4 5namespace Unity.PlasticSCM.Editor 6{ 7 internal static class GetRelativePath 8 { 9 internal static string ToApplication(string path) 10 { 11 Uri relativeToUri = new Uri(ApplicationDataPath.Get()); 12 Uri pathUri = new Uri(FixVolumeLetterPath(path)); 13 14 return Uri.UnescapeDataString( 15 relativeToUri.MakeRelativeUri(pathUri).ToString()); 16 } 17 18 static string FixVolumeLetterPath(string path) 19 { 20 string volumeLetter = new string(new char[] { path[0] }); 21 volumeLetter = volumeLetter.ToUpperInvariant(); 22 23 return string.Concat(volumeLetter, path.Substring(1)); 24 } 25 } 26}