-
-
Notifications
You must be signed in to change notification settings - Fork 491
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
GameObject
change undo/redo refactor to track different options
#3085
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
When reading an array, it is only cleared right before new items are going to be added, instead of it being done before an attempt to read the value has been made.
`GameObject`, instead of comparing all options against each other, now saves the state of and compares individual ones, so the change data is more memory-efficient. This way of tracking object changes also allows for proper undo/redo tracking with multiple remote users. `GameObjectState` was renamed to `GameObjectChange`, since it does not always preserve all object options anymore. TODO: Proper tilemap tile-change tracking
Previously, an assertion was used for performing this check, which was the cause of the crash. It wasn't taken into account performing undo/redo on a remotely-deleted object. Additionally, the warning message now includes the class name of the object.
`TileMap` tile changes are now stored in pairs, containing a tile array index and old/new tile, which takes its place. Allows for lighter storage in memory for undo/redo, as well as for lower-sized packets and proper remote tile undo/redo with editor remote level networking.
Vankata453
added
involves:editor
type:patch
category:code
status:needs-review
Work needs to be reviewed by other people
labels
Oct 21, 2024
tobbi
reviewed
Oct 21, 2024
tobbi
reviewed
Oct 21, 2024
tobbi
reviewed
Oct 21, 2024
MacOS build failure:
Windows build failure (maybe if the logs don't deceive me): |
Vankata453
force-pushed
the
undo-redo-refactor
branch
from
October 22, 2024 16:19
c106007
to
626ca5c
Compare
Frostwithasideofsalt
approved these changes
Oct 23, 2024
[ci skip]
[ci skip]
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
category:code
involves:editor
status:needs-review
Work needs to be reviewed by other people
type:patch
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
GameObject
, instead of comparing all options against each other, now saves the state of and compares individual ones, so the change data is more memory-efficient.This way of tracking object changes also allows for proper undo/redo tracking with multiple remote users (regarding the remote level editing concept, which branch these changes originate from).
TileMap
tile changes are now saved in a way more memory-efficient way. Instead of saving the whole tiles array for each change, only the changed tiles are saved in a list of pairs (tile index, old/new tile ID).