metagen_bhl_bind/README.md

23 lines
503 B
Markdown
Raw Normal View History

2022-12-03 17:18:25 +03:00
This package is used for code generation of bhl2 bindings for C# using Twig templates
2022-12-05 10:08:23 +03:00
Usage example:
2022-12-15 20:54:54 +03:00
$twig = \bhl_bind\get_twig();
$meta = \bhl_bind\prepare_meta($meta);
2022-12-05 10:08:23 +03:00
file_put_contents('autobind.cs',
2022-12-15 00:43:54 +03:00
$twig->render("codegen_autobind.twig",
2022-12-15 20:54:54 +03:00
[
'imports' => ['UnityEngine'],
'meta' => $meta
]
)
);
file_put_contents('types.cs',
$twig->render("codegen_types.twig",
[
'meta' => $meta
]
2022-12-05 10:08:23 +03:00
)
);