【cfg】 新增path模式: unity
parent
35f0af394a
commit
5f07daa657
|
|
@ -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)
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue