-
Notifications
You must be signed in to change notification settings - Fork 9
[BUG] "unload" script runs right after leaving the frame #115
Description
Describe the bug
when an object runs its unload script, the script is run right after the frame leaves. the most sensible thing to use unload for is to reset a clip for next time, but by the time the code tries to do so, it's already on a different frame and the clip is no longer visible.
To reproduce
Steps to reproduce the behavior:
- create 2 frames, stop() on the first one, and make a way to go between the 2 frames
- create a clip on the first frame
- add an unload script and make it try to set one of its own properties
- code will not execute properly
Expected behavior
unload scripts run right before exiting the frame
Editor version
all modern versions
Additional context
github's being github so here's a zip with a sample file: My Project3-17-2026_21-40-23.wick.zip
click the square in the bottom right to switch frames. one would expect the top left clip in frame 1 to rotate upon unloading, but it's actually the clip in frame 2 that gets rotated. if you delete the 2nd frame clip, you will instead get an error.
relevant discord thread: https://discord.com/channels/1406876763920797717/1481550313780416565