From 97ebf4c2242639c64576bb51ea09d1e498a0b9e8 Mon Sep 17 00:00:00 2001 From: rewin Date: Mon, 1 Apr 2024 22:43:56 +0300 Subject: [PATCH] auto undo --- studio/src/debug.rs | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/studio/src/debug.rs b/studio/src/debug.rs index 8da3936..338dbe6 100644 --- a/studio/src/debug.rs +++ b/studio/src/debug.rs @@ -7,12 +7,10 @@ use space_editor::{ prelude::*, space_editor_ui::{tools::gizmo::GizmoToolPlugin, EditorPluginGroup}, }; +use space_editor::prelude::space_undo::AppAutoUndo; use crate::{ - anim::SkeletalJoint, - camera_controller::{CameraController, CameraMotionSystem}, - input::{Action, InputAction, Lifecycle}, - is_editor, MainCamera, + anim::SkeletalJoint, camera_controller::{CameraController, CameraMotionSystem}, input::{Action, InputAction, Lifecycle}, interaction::Selectable, is_editor, scene::SceneElement, MainCamera }; #[derive(Resource, Deref, DerefMut)] @@ -73,6 +71,13 @@ impl Plugin for DebugPlugin { .disable::(), ); + app.auto_undo::>(); + app.auto_undo::(); + app.auto_undo::>(); + app.auto_undo::(); + app.auto_undo::(); + + app.add_systems(Update, sync_editor_camera); app.add_systems( Update,