End Spacing not Saved on Disable [Version 1, in development]

Issue #2 resolved
Beka Westberg repo owner created an issue

Problem Statement

Sometimes you may want to temporarily disable, and then re-enable a scroll snap. If the scroll snap is set to loop, and has an end margin that is different from the other item margins, it can cause the margin information to become "corrupted".

EndSpacingBug.gif

Observe how when item 2 loops it is further away from item 1 than it was originally.

Expected Behavior

The scroll snap should save the current end margin (either to the serialized end margin variable, or somewhere else) when it is disabled. This way when it is reloaded the correct end margin will be added to the last item.

Steps to Reproduce

  1. Create a Scroll Snap with at least two items, evenly spaced.
  2. Set the end margin to be different than the margin between items.
  3. Run the game, and loop 1 item.
  4. Disable and reenable the scroll snap.
  5. Loop another item, observe how its margin is incorrect.

Additional Information

N/A

Comments (2)

  1. Log in to comment