this post was submitted on 13 Dec 2024
14 points (100.0% liked)
Bevy
269 readers
9 users here now
A community for discussion around the bevy game engine! https://bevyengine.org/
founded 1 year ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
view the rest of the comments
How did you implement the undo/redo logic?
I presume you don't delete the entities on undo but hide them instead? Then you can show them again if redo is triggered?
I have a special trait that generates a reverse command. And store a stack of commands. Here is the source.
No, I do a full despawn. Just remember it's data to spawn again thanks to the mentioned trait.