From 5f07daa657002054e3822afef73aee9d152954a2 Mon Sep 17 00:00:00 2001 From: walon Date: Mon, 17 May 2021 13:24:44 +0800 Subject: [PATCH] =?UTF-8?q?=E3=80=90cfg=E3=80=91=20=E6=96=B0=E5=A2=9Epath?= =?UTF-8?q?=E6=A8=A1=E5=BC=8F:=20unity?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Source/Validators/PathValidator.cs | 25 +++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/src/Luban.Job.Cfg/Source/Validators/PathValidator.cs b/src/Luban.Job.Cfg/Source/Validators/PathValidator.cs index 9f32c2f..cd5c971 100644 --- a/src/Luban.Job.Cfg/Source/Validators/PathValidator.cs +++ b/src/Luban.Job.Cfg/Source/Validators/PathValidator.cs @@ -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 { private readonly Regex _pat1; @@ -229,6 +245,15 @@ namespace Luban.Job.Cfg.Validators PathPattern = new RegexPattern(ss[1], ss[2]); break; } + case "unity": + { + if (ss.Length != 1) + { + ThrowCompileError(def, ""); + } + PathPattern = new UnityAddressablePattern(); + break; + } case "ue": { if (ss.Length != 1)