【a】可视化剧本编辑器 10.StoryEditor
This commit is contained in:
38
Assets/10.StoryEditor/RunTime/Resource/ResourcePathData.cs
Normal file
38
Assets/10.StoryEditor/RunTime/Resource/ResourcePathData.cs
Normal file
@@ -0,0 +1,38 @@
|
||||
using System;
|
||||
|
||||
namespace Stary.Evo.StoryEditor
|
||||
{
|
||||
/// <summary>
|
||||
/// 资源路径数据
|
||||
/// </summary>
|
||||
[Serializable]
|
||||
public struct ResourcePathData
|
||||
{
|
||||
/// <summary>
|
||||
/// 包体ID
|
||||
/// </summary>
|
||||
public string packageID;
|
||||
|
||||
/// <summary>
|
||||
/// 资源路径
|
||||
/// </summary>
|
||||
public string path;
|
||||
|
||||
public ResourcePathData(string packageID, string path)
|
||||
{
|
||||
this.packageID = packageID;
|
||||
this.path = path;
|
||||
}
|
||||
|
||||
public void AddPath(params string[] tail)
|
||||
{
|
||||
if(tail == null || tail.Length == 0)
|
||||
return;
|
||||
|
||||
foreach (var t in tail)
|
||||
{
|
||||
path = string.IsNullOrEmpty(path) ? t : System.IO.Path.Combine(path, t);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user