You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm trying to spawn a component with vec of Handle<Clip> with at least one instance, but Handle::<T>::clone_value() returns a boxed DynamicStruct instead of a clone of the Handle<T>, which leads to an error rising from the list_apply function that can't handle a DynamicStruct;
even though Something implements Clone the Reflect::clone_value returns a DynamicStruct instead;
What you expected to happen
The scene should spawn no problem
What actually happened
Panics
thread 'main' panicked at 'Attempted to push invalid value of type bevy_animation_tests::Something.', /home/lassade/Rust/bevy/crates/bevy_reflect/src/impls/std.rs:59:13
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
Segmentation fault (core dumped)
Additional information
My ideas to solve this issue are:
Add support for DynamicStructs in list_apply ()
Change the Reflect implementation for Handle<T>
Maybe change the Reflect behavior to require a Clone impl by default and add an option to use dynamic bundle instead
I think 1 and 2 must be done, 3 doesn't solve the problem but I think it at least will make it more clearer and maybe faster;
The text was updated successfully, but these errors were encountered:
Bevy version
main branch cb98d31
Operating system & version
Fedora 33
What you did
I'm trying to spawn a component with vec of
Handle<Clip>
with at least one instance, butHandle::<T>::clone_value()
returns a boxedDynamicStruct
instead of a clone of theHandle<T>
, which leads to an error rising from thelist_apply
function that can't handle aDynamicStruct
;That also affects simple things like this:
even though
Something
implementsClone
theReflect::clone_value
returns aDynamicStruct
instead;What you expected to happen
The scene should spawn no problem
What actually happened
Panics
Additional information
My ideas to solve this issue are:
DynamicStructs
inlist_apply
()Reflect
implementation forHandle<T>
Reflect
behavior to require a Clone impl by default and add an option to use dynamic bundle insteadI think 1 and 2 must be done, 3 doesn't solve the problem but I think it at least will make it more clearer and maybe faster;
The text was updated successfully, but these errors were encountered: