Skip to content

Commit 4d92a58

Browse files
committed
fix small issues
1 parent 76a2443 commit 4d92a58

File tree

2 files changed

+10
-3
lines changed

2 files changed

+10
-3
lines changed

crates/bevy_api_gen/templates/footer.tera

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ impl bevy::app::Plugin for {{ "ScriptingPlugin" | prefix_cratename | convert_cas
1212
let mut world = app.world_mut();
1313

1414
{% for item in items %}
15-
NamespaceBuilder::<{{ item.ident }}>::new(world)
15+
NamespaceBuilder::<{{ item.import_path }}>::new(world)
1616
{%- for function in item.functions -%}
1717
.overwrite_script_function("{{ function.ident }}", |
1818
{%- for arg in function.args -%}
@@ -24,7 +24,7 @@ impl bevy::app::Plugin for {{ "ScriptingPlugin" | prefix_cratename | convert_cas
2424
: {{- arg.proxy_ty -}},
2525
{%- endfor -%}
2626
| {
27-
let output: {{ function.output.proxy_ty }} = {{ item.ident }}::{{ function.ident }}(
27+
let output: {{ function.output.proxy_ty }} = {{ item.import_path }}::{{ function.ident }}(
2828
{%- for arg in function.args -%}
2929
{%- if arg.ident != "self" -%}
3030
{{- arg.ident -}}

crates/bevy_api_gen/templates/header.tera

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,14 @@ use super::{{crate}}::*;
99
{% endfor %}
1010

1111

12-
use bevy_mod_scripting_core::{AddContextInitializer, StoreDocumentation, bindings::ReflectReference};
12+
use bevy_mod_scripting_core::{
13+
AddContextInitializer,
14+
StoreDocumentation,
15+
bindings::{
16+
ReflectReference,
17+
function::from::{Ref, Mut, Val}
18+
}
19+
};
1320
use bevy_mod_scripting_functions::RegisterScriptFunction;
1421

1522
{% if args.self_is_bms_lua %}

0 commit comments

Comments
 (0)