Permalink
Please
sign in to comment.
Showing
with
31 additions
and 22 deletions.
@@ -0,0 +1,27 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using System.IO; | ||
using System.Linq; | ||
using System.Reflection; | ||
using System.Text; | ||
using System.Threading.Tasks; | ||
using Xenko.Core.IO; | ||
|
||
namespace Xenko.Assets | ||
{ | ||
static class ToolLocator | ||
{ | ||
public static UFile LocateTool(string toolName) | ||
{ | ||
var tool = UPath.Combine(Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location), new UFile(toolName)); | ||
if (File.Exists(tool)) | ||
return tool; | ||
|
||
tool = UPath.Combine(Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location), new UFile($"../../content/{toolName}")); | ||
if (File.Exists(tool)) | ||
return tool; | ||
|
||
return null; | ||
} | ||
} | ||
} |
0 comments on commit
b55ab0c