metagen_bhl_bind/README.md

503 B

This package is used for code generation of bhl2 bindings for C# using Twig templates

Usage example:

$twig = \bhl_bind\get_twig();
$meta = \bhl_bind\prepare_meta($meta);

file_put_contents('autobind.cs', 
  $twig->render("codegen_autobind.twig", 
    [
     'imports' => ['UnityEngine'], 
     'meta' => $meta
    ]
  )
);

file_put_contents('types.cs', 
  $twig->render("codegen_types.twig", 
    [
     'meta' => $meta
    ]
  )
);