GameDataManager
Last updated
Last updated
The system manages data so it can be serialized, and adapts deserialized data for use by FPS Engine. For instance, consider Item_SO
. Since we cannot directly serialize Item_SO
in JSON, GameDataManager
processes it and saves its name instead. When loading, the name is used to fetch the actual Item_SO
value from the .
GameDataManager
temporarily stores data and, upon invoking the Save method, serializes, encrypts, and stores it securely as a JSON file through & .
When loading instantiated objects, we only have details about their type and saveFields. Given this information, we can't instantiate the corresponding prefab for that type. To address this, we can establish a relationship between Types and Prefabs in the TypeRegistry, allowing us to read the Type and instantiate the associated Prefab. GameDataManager stores TypeToPrefab Mappings, so you can assign a Prefab to each type that needs to be instantiated.
To optimize performance and minimize overhead, include only necessary types in the Type-to-Prefab mapping. Avoid references that are unnecessary or unused.