How can I move objects from one to another layout without changing their current private variables?
Thanks in advance.
You could use global variables
Develop games in your browser. Powerful, performant & highly capable.
If the objects are global, they won't be destroyed when switching layouts. Or you could save all relevant info to an array, and recreate the objects.
Global array, that is. Otherwise the array will get destroyed with layout change, too
Whoops, uh, yeah. Thanks for mentioning that, Mipey.
Thanks a lot guys, I did it with global variables, but I still think there should be a ''move to layout' action' feature.