【cfg】 新增path模式: unity

main
walon 2021-05-17 13:24:44 +08:00
parent 35f0af394a
commit 5f07daa657
1 changed files with 25 additions and 0 deletions

View File

@ -64,6 +64,22 @@ namespace Luban.Job.Cfg.Validators
} }
} }
class UnityAddressablePattern : IPathPattern
{
public bool EmptyAble { get; set; }
public string Mode => "unity";
public UnityAddressablePattern()
{
}
public object CalcFinalPath(string path)
{
return path;
}
}
class Ue4ResourcePattern : IPathPattern class Ue4ResourcePattern : IPathPattern
{ {
private readonly Regex _pat1; private readonly Regex _pat1;
@ -229,6 +245,15 @@ namespace Luban.Job.Cfg.Validators
PathPattern = new RegexPattern(ss[1], ss[2]); PathPattern = new RegexPattern(ss[1], ss[2]);
break; break;
} }
case "unity":
{
if (ss.Length != 1)
{
ThrowCompileError(def, "");
}
PathPattern = new UnityAddressablePattern();
break;
}
case "ue": case "ue":
{ {
if (ss.Length != 1) if (ss.Length != 1)