diff --git a/tpl/bind_ecslite.twig b/tpl/bind_ecslite.twig index e2a0e3c..e90c146 100644 --- a/tpl/bind_ecslite.twig +++ b/tpl/bind_ecslite.twig @@ -11,7 +11,7 @@ if(e.Unpack(out EcsWorld world, out int id) == false) throw new Exception("No entity found"); - ref var cmp = ref world.GetPool<{{o.name}}>().Ensure(id); + ref var cmp = ref world.GetPool<{{token_or(o, 'bhl_native_class', o.name)}}>().Ensure(id); return null; } @@ -34,7 +34,7 @@ if(e.Unpack(out EcsWorld world, out int id) == false) return null; - world.GetPool<{{o.name}}>().Del(id); + world.GetPool<{{token_or(o, 'bhl_native_class', o.name)}}>().Del(id); return null; } @@ -59,7 +59,7 @@ if(e.Unpack(out EcsWorld world, out int id) == false) dv.SetBool(false); else - dv.SetBool(world.GetPool<{{o.name}}>().Has(id)); + dv.SetBool(world.GetPool<{{token_or(o, 'bhl_native_class', o.name)}}>().Has(id)); stack.Push(dv); return null; @@ -104,7 +104,7 @@ if(e.Unpack(out EcsWorld world, out int id) == false) throw new Exception("No entity found"); - ref var cmp = ref world.GetPool<{{o.name}}>().Ensure(id); + ref var cmp = ref world.GetPool<{{token_or(o, 'bhl_native_class', o.name)}}>().Ensure(id); var v = cmp.{{f.name}}; {%- if token_or(f, 'bhl_set', 1) != 0 ~%} @@ -148,7 +148,7 @@ if(e.Unpack(out EcsWorld world, out int id) == false) throw new Exception("No entity found"); - ref var cmp = ref world.GetPool<{{o.name}}>().Ensure(id); + ref var cmp = ref world.GetPool<{{token_or(o, 'bhl_native_class', o.name)}}>().Ensure(id); {%~ if m.returntype %} var return_val =