When I have global sprites on a global layer, travelling between layouts duplicates the sprites and destroys any information they contain.
Description of Capx
There are 4 global square sprites on the top layer. You can click on them to make them change color and increment their instance variable. There is a button on the main layer that takes you to the other layout. Note that when the button is pressed, the layout changes, but the squares
Steps to Reproduce Bug
- Start the project in debug mode.
- Click the little squares to make them change color.
- Click the button to change layouts
- Notice that all the squares, which are global, have reverted to thier initial state of being green.
- Notice that the Instance variable, which has been counting clicks, has reverted to 0
- Notice that there are now 8 squares instead of 4, and that each pair has duplicate UID
I am expecting each UI element to be created if it doesn't already exist. If it does already exist, I expect it to keep it's state and instance data.
I was expecting each of the 4 little squares to retain it's color and instance variable as the layout changes.
- Chrome: (YES)
- FireFox: (YES)
- Internet Explorer: (YES)
Operating System and Service Pack
Windows 7, SP1
Construct 2 Version ID
Release 198, 64 bit.