Added a function to the gamecontext for the serialization