This plugin allows you to use Google SpreadSheets as a Config storage for your game. The data is available via a scripting API or you can connect the data source to any MonoBehaviour class field, using Unity editor. You can learn more on how to use the plugin in the Guidelines section.
Supported data types are:
- string, int, float, long
- Dictionary<supported_type, supported_type>
This plugin has unity editor implementation. Which means you can connect data from spreadsheet cells to any field of your MonoBehaviour script. Data can be connected to any field if the field type is supported. Data retrieval is recursive. For example, Vector3 class is a serializable class with x, y, z float fields - you can connect data to these fields. The same applies to your own scripts. Here is how the editor data connection looks like. And here is how you can retrieve spreadsheet data using scripting.
Advantages of keeping data in Google Spreadsheets
Game designers and programmers can modify Config data without access to the code
You may use spreadsheet formulas to calculate dependencies between a Config value, which is extremely helpful for designing and configuring the game balance.
The project Config can be very user-friendly and readable. Instead of XML and JSON or Yaml files. You may use all of the formatting power of Google Spreadsheets.
You will never lose a thing since the google docs have a full revision history.
You can store the localization in Spreadsheets, so it can be easily accessed and modified by translators.
The requested data is cached, and stored as text files in the project Resources folder. You can find advantages and disadvantages to this approach below.
Once data is cached, the editor will not do any WWW calls anymore
The application that has been built will not do any WWW calls
Requested data is delivered immediately, without any timeouts
You can see what document version you are using in the plugin setting, so you can decide when to update data cash to your project from google doc. So if somebody spoils some data in the doc, it will have zero effects on your project.
Data is not real-time. You can not get the updated value on the fly. You need to re cash the document in order to use the updated data.