【Unity】区切り文字にスラッシュを使用してパスを連結する関数 その2

ソースコード using System.IO; public static class PathUtils { /// <summary> /// 文字列の配列を 1 つのパスに結合します /// </summary> public static string Combine( params string[] paths ) { return paths .Aggregate( ( a, b ) => Path.Combine( a, b ) ) .Replace( "\\", "/" ); } } 使い方 PathUtils.Combine( "Assets", "Prefa…