Add serialization to the tilemap object.