mirror of
https://github.com/kaosat-dev/Blender_bevy_components_workflow.git
synced 2025-01-30 23:45:53 +00:00
Fix required bounds for GltfRefPlugin.
This commit is contained in:
parent
930033354b
commit
1758f8dbff
@ -134,9 +134,9 @@ pub trait FromGltfRef {
|
|||||||
|
|
||||||
/// Plugin for automatically converting [`GltfRef`]s into their corresponding
|
/// Plugin for automatically converting [`GltfRef`]s into their corresponding
|
||||||
/// `T`.
|
/// `T`.
|
||||||
pub struct GltfRefPlugin<T: Component + FromGltfRef>(PhantomData<T>);
|
pub struct GltfRefPlugin<T: Component + FromGltfRef + TypePath>(PhantomData<T>);
|
||||||
|
|
||||||
impl<T: Component + FromGltfRef + Reflect + TypePath> Plugin for GltfRefPlugin<T> {
|
impl<T: Component + FromGltfRef + TypePath> Plugin for GltfRefPlugin<T> {
|
||||||
fn build(&self, app: &mut App) {
|
fn build(&self, app: &mut App) {
|
||||||
app.register_type::<GltfRef<T>>().add_systems(
|
app.register_type::<GltfRef<T>>().add_systems(
|
||||||
Update,
|
Update,
|
||||||
@ -147,7 +147,7 @@ impl<T: Component + FromGltfRef + Reflect + TypePath> Plugin for GltfRefPlugin<T
|
|||||||
|
|
||||||
// Manual implementation of Default for GltfRefPlugin to avoid `Default` trait
|
// Manual implementation of Default for GltfRefPlugin to avoid `Default` trait
|
||||||
// bounds on `T`.
|
// bounds on `T`.
|
||||||
impl<T: Component + FromGltfRef> Default for GltfRefPlugin<T> {
|
impl<T: Component + FromGltfRef + TypePath> Default for GltfRefPlugin<T> {
|
||||||
fn default() -> Self {
|
fn default() -> Self {
|
||||||
Self(Default::default())
|
Self(Default::default())
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user