Import from CSV
To set up importing from a CSV file, perform the following actions:
- Create a GameTable object (right click on Project window then Create / Game Tables / Game Table).
- Set up the GameTable object properties:
- Choose CSV in the Source dropdown.
- Specify a CSV file Text Asset from which the data should be imported.
- Fill the Search Path text box with a path to the folder containing Prefabs the CSV file refers on. The path is specified relative the project root, for example Assets/Prefabs/Units.
- Optional. Specify additional settings that alter the way the table data should be interpreted. For example, you may choose whether to use object-per-row or property-per-row layout. For more see GameTable Inspector.
- Click Apply Game Table.
- Check the Console window. If everything gone well, it should contain a message like the following:
Game Tables: modified 5 objects (of 5), 53 properties (of 88), 0 items removed
If the Console contains any errors, fix their causes and then click Apply Game Table again.
- Optional. Save all the changes made by Game Tables by clicking File / Save Project menu.