Easy Connect for Google Sheets API
Easily connect your Unity project to Google Sheets using the official Google Sheets API.
by Hammer Solves Everything
Price History +
Easily connect your Unity project to Google Sheets using the official Google Sheets API.
Features
- Read and write values in Google Sheets via API, directly from Unity C# scripts
- Supports private (non-public) spreadsheets if shared with your service account
- Manage sheets, values, and developer metadata
- Authenticate using a Service Account (Google Cloud Console credentials)
- Fully async/await API design for smooth Unity integration
- Detailed error handling with custom exceptions
- Can easily disable the asset by using the DISABLE_GSHEETS_API symbol.
- Includes samples and documentation
Note
- This asset is not an official Google product; it is developed by a third party.
- This asset uses the official Google Sheets API.
- You must create a Service Account and download the credentials JSON file from Google Cloud Console to use this asset.
- This asset uses Newtonsoft Json.NET for JSON serialization.
- The Google Sheets API itself has quota limits (request limits, rate limits, etc.).
---
API Examples (Not exhaustive)
- Read/Write Values:
- ValuesApi.GetAsync()
- ValuesApi.UpdateAsync()
- ValuesApi.AppendAsync()
- Spreadsheet Operations:
- RootApi.GetAsync()
- RootApi.BatchUpdateAsync()
- Sheet Copy:
- SheetsApi.CopyToAsync()
- Developer Metadata:
- DeveloperMetadataApi.SearchAsync()
- DeveloperMetadataApi.GetAsync()
Analytics & Error Reporting Samples
This package includes two ready-to-use sample scripts.
You are free to use or modify these samples in your own projects.
- GSheetsAnalytics
- Easily send app events to Google Sheets for analytics or tracking.
- GSheetsErrorReport
- Automatically logs Unity Debug.Log messages (Exception, Error, Warning) to Google Sheets for remote error monitoring.
Both components buffer data and send it in batches at regular intervals, significantly reducing API usage and quota consumption.
---
Error Handling
If an API request fails, a custom exception (e.g., GSheetsApiException) is thrown.
You can access the HTTP status code and response body for debugging.
Disabling via Scripting Define Symbols
You can easily disable the asset by using a scripting define symbol: DISABLE_GSHEETS_API.
This is useful, for example, when excluding it from release builds.
---
Documentation
See the site below for the full API reference and usage examples.
https://tmls.gitbook.io/easy-connect-gsheets-unity