Detailed Method Reference
Namespace: Canley.Utility.CSV.Standard
Class: CSVTable<T>
Definition
public void Load(CanleyCSVManager manager, string overrideName = null)-
Description: The primary entry point for populating the database, clearing existing records and initiating a two-step discovery process to locate and hydrate data.
-
Workflow:
- Hierarchy of Truth: Determines the target filename using an explicit override name, the manager’s target file slot, or defaulting to the C# class name.
- Smart-Load Pipeline: Hunts for the file first in the Unity
Resourcesfolder (master data), then falls back toApplication.persistentDataPath(user saves). - Legacy Header Injection: Automatically checks if the first row matches class fields, injecting a sidecar header file if necessary.
- Hydration: Parses the raw string grid and maps rows to strongly-typed records via reflection while populating the shadow dictionary.
-
Parameters:
manager: TheCanleyCSVManagerinstance handling underlying file I/O operations.overrideName: An optional explicit filename string to bypass standard naming conventions.
-
Returns:
void -
Example:
public void InitialiseInventory(CSVTable<ItemRecord> inventoryTable, CanleyCSVManager csvManager)
{
inventoryTable.Load(csvManager);
}TIP
Use the
overrideNameparameter when you need to load specific save slots or alternative configurations without changing the manager’s inspector settings.