Exemplo n.º 1
0
        public static string GetResourceExportPath()
        {
            var resourcePath = KBuildTools.GetExportPath(EditorUserBuildSettings.activeBuildTarget,
                                                         KResourceModule.Quality);

            return(resourcePath);
        }
Exemplo n.º 2
0
    /// <summary>
    /// 获取完整的打包路径,并确保目录存在
    /// </summary>
    /// <param name="path"></param>
    /// <param name="buildTarget"></param>
    /// <returns></returns>
    public static string MakeSureExportPath(string path, BuildTarget buildTarget, KResourceQuality quality)
    {
        path = KBuildTools.GetExportPath(buildTarget, quality) + path;

        string exportDirectory = path.Substring(0, path.LastIndexOf('/'));

        if (!System.IO.Directory.Exists(exportDirectory))
        {
            System.IO.Directory.CreateDirectory(exportDirectory);
        }

        path = path.Replace("/", @"\");

        return(path);
    }