框架上传
This commit is contained in:
@@ -0,0 +1,30 @@
|
||||
using System.IO;
|
||||
using UnityEngine;
|
||||
|
||||
namespace Stary.Evo.Editor
|
||||
{
|
||||
public static class StringExtension
|
||||
{
|
||||
/// <summary>
|
||||
/// 是否是一个文件夹
|
||||
/// </summary>
|
||||
/// <param name="self"></param>
|
||||
/// <returns></returns>
|
||||
public static bool IsDirectory(this string self)
|
||||
{
|
||||
var fileInfo = new FileInfo(self);
|
||||
if ((fileInfo.Attributes & FileAttributes.Directory) != 0)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
public static string ToAssetsPath(this string self)
|
||||
{
|
||||
var assetsFullPath = Path.GetFullPath(Application.dataPath);
|
||||
|
||||
return "Assets" + Path.GetFullPath(self).Substring(assetsFullPath.Length).Replace("\\", "/");
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
fileFormatVersion: 2
|
||||
guid: abbb0ff31d684ebfb0b17b80691110af
|
||||
timeCreated: 1635478967
|
||||
Reference in New Issue
Block a user