From 90137cc3e868a2c7e732fbabb46e696c87c24d7c Mon Sep 17 00:00:00 2001 From: ps Date: Mon, 5 Dec 2022 10:08:23 +0300 Subject: [PATCH 1/2] =?UTF-8?q?=D0=98=D0=B7=D0=BC=D0=B5=D0=BD=D0=B8=D0=BB(?= =?UTF-8?q?=D0=B0)=20=D0=BD=D0=B0=20'README.md'?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/README.md b/README.md index c5bfec3..3dc937e 100644 --- a/README.md +++ b/README.md @@ -1 +1,11 @@ This package is used for code generation of bhl2 bindings for C# using Twig templates + +Usage example: + + $twig = \bhl_bind\bhl_twig(); + file_put_contents('autobind.cs', + $twig->render("codegen_register.twig", + ['imports' => ['UnityEngine'], + 'units' => $meta->getUnits()] + ) + ); \ No newline at end of file From 036714ad24ba5ddcedc06c27544ed2d18bbbe755 Mon Sep 17 00:00:00 2001 From: Pavel Shevaev Date: Mon, 5 Dec 2022 10:18:27 +0300 Subject: [PATCH 2/2] Minor tweaks here and there --- tpl/macro.twig | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/tpl/macro.twig b/tpl/macro.twig index 576cfcc..6f80d37 100644 --- a/tpl/macro.twig +++ b/tpl/macro.twig @@ -352,6 +352,7 @@ for(int i=0;i 1) { + if(args_info.CountArgs() > 1) dv = stack.Pop(); - } {%- endif ~%} EcsEntity e = default;