File tree Expand file tree Collapse file tree 2 files changed +12
-3
lines changed
crates/bevy_api_gen/templates Expand file tree Collapse file tree 2 files changed +12
-3
lines changed Original file line number Diff line number Diff line change @@ -26,11 +26,20 @@ impl ::bevy::app::Plugin for {{ "ScriptingPlugin" | prefix_cratename | convert_c
26
26
| {
27
27
let output: {{ function.output.proxy_ty }} = ::{{ item.import_path }}::{{ function.ident }}(
28
28
{%- for arg in function.args -%}
29
+ {%- if arg.proxy_ty is matching("Ref.*")-%}
30
+ &
31
+ {%- endif -%}
32
+ {%- if arg.proxy_ty is matching ("Mut.*")-%}
33
+ &mut
34
+ {%- endif -%}
29
35
{%- if arg.ident != "self" -%}
30
36
{{- arg.ident -}}
31
37
{%- else -%}
32
38
_{{- arg.ident -}}
33
- {%- endif -%}.into(),
39
+ {%- endif -%}
40
+ {%- if arg.proxy_ty is matching("Val.*")-%}
41
+ .into()
42
+ {%- endif -%},
34
43
{%- endfor -%}
35
44
).into();
36
45
output
Original file line number Diff line number Diff line change @@ -18,7 +18,7 @@ use bevy_mod_scripting_core::{
18
18
}
19
19
};
20
20
{% if args.self_is_bms_lua %}
21
- use crate::* ;
21
+ use crate::{*, namespaced_register::NamespaceBuilder} ;
22
22
{% else %}
23
- use bevy_mod_scripting_lua::* ;
23
+ use bevy_mod_scripting_lua::{*, namespaced_register::NamespaceBuilder}; ;
24
24
{% endif %}
You can’t perform that action at this time.
0 commit comments