TypeRegistry

The TypeRegistry class is part of the cowsins.SaveLoad namespace and provides functionality for mapping types to associated prefabs. This mapping allows for loading and instantiating objects from a saved state. When an object is loaded from a save file, only the object's type and its associated save fields are available. However, the actual object cannot be instantiated directly from this information alone. The TypeRegistry serves as a lookup table to associate types with prefabs. This way, once the object type is identified, the corresponding prefab can be instantiated, and additional data can be loaded afterward.

TypeRegistry is implemented by GameDataManager. For more information regarding TypeRegistry & how to associate Prefabs to Types, please navigate to GameDataManager´s page.

Last updated