From 7ee945a65b32fa6a9af9ec998b39d931b40c08b2 Mon Sep 17 00:00:00 2001 From: andriyDev Date: Tue, 12 Nov 2024 23:36:16 -0800 Subject: [PATCH] Update InspectorEguiImplFnMany to match the bevy-inspector-egui definition. --- src/inspector.rs | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/src/inspector.rs b/src/inspector.rs index 39c7a0a..0b56f7d 100644 --- a/src/inspector.rs +++ b/src/inspector.rs @@ -6,9 +6,11 @@ use std::{ use crate::{editor::LookupCurveEguiEditor, LookupCache, LookupCurve}; use bevy_app::{App, Plugin}; use bevy_asset::{Assets, Handle}; -use bevy_inspector_egui::inspector_egui_impls::InspectorEguiImpl; use bevy_inspector_egui::reflect_inspector::InspectorUi; -use bevy_reflect::{Reflect, TypeRegistry}; +use bevy_inspector_egui::{ + inspector_egui_impls::InspectorEguiImpl, reflect_inspector::ProjectorReflect, +}; +use bevy_reflect::{PartialReflect, TypeRegistry}; pub(crate) struct InspectorPlugin; @@ -44,8 +46,8 @@ type InspectorEguiImplFnMany = for<'a> fn( &dyn Any, egui::Id, InspectorUi<'_, '_>, - &mut [&mut dyn Reflect], - &dyn Fn(&mut dyn Reflect) -> &mut dyn Reflect, + &mut [&mut dyn PartialReflect], + &dyn ProjectorReflect, ) -> bool; fn add_raw( @@ -65,8 +67,8 @@ fn many_unimplemented( _options: &dyn Any, _id: egui::Id, _env: InspectorUi<'_, '_>, - _values: &mut [&mut dyn Reflect], - _projector: &dyn Fn(&mut dyn Reflect) -> &mut dyn Reflect, + _values: &mut [&mut dyn PartialReflect], + _projector: &dyn ProjectorReflect, ) -> bool { ui.label("LookupCurve does not support multi-editing."); false