From 68c48d0c02c251390be165ab62b8d28264aefca3 Mon Sep 17 00:00:00 2001 From: walon Date: Wed, 2 Mar 2022 18:03:37 +0800 Subject: [PATCH] =?UTF-8?q?=E3=80=90=E4=BF=AE=E5=A4=8D=E3=80=91=E4=BF=AE?= =?UTF-8?q?=E5=A4=8D=20code=5Fcs=5Funity=5Feditor=5Fjson=20=E8=A7=A3?= =?UTF-8?q?=E6=9E=90=E5=A4=9A=E6=80=81=E6=95=B0=E6=8D=AE=E4=BB=A3=E7=A0=81?= =?UTF-8?q?=EF=BC=8C=E5=A6=82=E6=9E=9Cnamespace=E4=B8=BA=E7=A9=BA=EF=BC=8C?= =?UTF-8?q?=E7=94=9F=E6=88=90=E9=87=8D=E5=A4=8Dcase=20=E9=A1=B9=E7=9A=84bu?= =?UTF-8?q?g?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/Luban.Server/Templates/config/cs_unity_editor_json/bean.tpl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Luban.Server/Templates/config/cs_unity_editor_json/bean.tpl b/src/Luban.Server/Templates/config/cs_unity_editor_json/bean.tpl index 9f5c820..8b543a5 100644 --- a/src/Luban.Server/Templates/config/cs_unity_editor_json/bean.tpl +++ b/src/Luban.Server/Templates/config/cs_unity_editor_json/bean.tpl @@ -75,7 +75,7 @@ public {{x.cs_class_modifier}} partial class {{name}} : {{if parent_def_type}} { switch (type) { {{~for child in x.hierarchy_not_abstract_children~}} - {{~if child.namespace == x.namespace~}} + {{~if child.namespace == x.namespace && x.namespace != '' ~}} case "{{child.full_name}}": {{~end~}} case "{{cs_impl_data_type child x}}":obj = new {{child.full_name}}(); break;