Skip to content

[BUG] "unload" script runs right after leaving the frame #115

@BaronAWC

Description

@BaronAWC

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:

  1. create 2 frames, stop() on the first one, and make a way to go between the 2 frames
  2. create a clip on the first frame
  3. add an unload script and make it try to set one of its own properties
  4. 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

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions