From 8c9cd5c5b0e26a11ed81409cde89707b50a4d7f9 Mon Sep 17 00:00:00 2001 From: Pavel Shevaev Date: Fri, 9 Dec 2022 17:38:17 +0300 Subject: [PATCH] Fixing classes registration --- tpl/macro.twig | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tpl/macro.twig b/tpl/macro.twig index 42212eb..c57d940 100644 --- a/tpl/macro.twig +++ b/tpl/macro.twig @@ -546,6 +546,7 @@ Script_{{o.name|norm_name}}.Method_{{m.name}}.ReturnValue(frm, stack } {% endif ~%} ); + {{scope}}.{{o.name|ns_prefix}}Define(cl); {% if has_token(o, 'POD') and not has_token(o, 'bhl_custom_rw') %} {{Warn("bhl POD boxing '" ~ o.name ~ "'")}} @@ -563,7 +564,6 @@ Script_{{o.name|norm_name}}.Method_{{m.name}}.ReturnValue(frm, stack {% endif %} {% endfor %} - {{scope}}.{{o.name|ns_prefix}}Define(cl); cl.Setup(); } @@ -725,10 +725,10 @@ Script_{{o.name|norm_name}}.Method_{{m.name}}.ReturnValue(frm, stack {% if has_token(o, 'bhl_ecs_component_ref') %} { var cl = new ClassSymbolNative("{{o.name}}__Ref", null, null); + types.ns.Define(cl); {% for f in o.getfields %} {{ _self.ecs_component_field_ref(o, f) }} {% endfor %} - types.ns.Define(cl); cl.Setup(); {