I mean your second suggestion and it's exactly what I did, but I was wondering if there is a better alternative. I have to many objects that I need to save the position, so creating global variables for each X and Y coordinate of each object is a pain in the ass... In the image below I highlighted the objects of my game scene to better exemplify.