/// <summary> /// Converts a system absolute path to the Asset folder as root /// </summary> /// <param name="path">The absolute path to convert</param> /// <returns>The path with start in the Asset folder</returns> internal static string AbsoluteToAssetPath(string path) { path = Directory.GetParent(path).FullName; path = path.Replace(MatEdit.ProjectPath(), ""); path = path.Replace(@"\", "/"); path = path.Substring(1, path.Length - 1); return(path); }
public static string GetAsset(string content) { return(MatEdit.AbsoluteToAssetPath(Get(content))); }