Repository navigation
Conversation
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Description
Fixes #2040.
Sticker keeps its parent as a runtime object reference. When Save State recreates the instances, that reference is lost. This change records the Sticker owner, behavior name, and parent network ID in the scene snapshot. It restores attachments after the instances have been recreated, so the sticker follows the correct parent even when several instances share the same object type.
Snapshots without Sticker data retain their previous behavior. The restore also respects the selected save profiles and leaves the sticker detached if the recorded parent is missing. The validator change permits the required scene APIs for Sticker only.
How to test
Open
game.jsonfrom the attached ZIP in GDevelop 5.6.287 and run its five gameplay tests. The IndexedDB case saves the game, deletes the original objects, reloads, then checks that the sticker follows the same parent with its original offset. The other cases cover serialized snapshots, in-place restoration, profile-excluded objects, legacy saves, and a missing parent. Three tests fail on the current extension and all five pass with the fix. The extension repository build and automated checks also passed.AI usage
Codex helped investigate the runtime behavior and generated the patch and regression project. The tests were executed locally in GDevelop Desktop, including the IndexedDB save and load.
Example project
gdevelop-2040-sticker-save-state-example.zip