Topic was automatically imported from the old Question2Answer platform.
Asked By
Xian
Hello, I stored my entire game in an inner class of my autoload script. My problem is when I save the class, what is being saved is the reference to the class and not the data of the class. What should I do?
Probably the easiest way to handle that is to make a method on your inner class that returns a dictionary containing the data you want to save. Then, when you save that class, save instead a call to that method. Similarly, when reloading, have a method which goes and looks at the specific keys you want to set on your inner class and set them appropriately. Does that make sense?