Posts

Showing posts from May, 2020

Using Google Sheets Python API to Manage Scriptable Data in Unity

Image
In my free time, I've been developing a digital trading-card game in Unity with my twin brother. We had accumulated a large amount of card data in a Google Sheet, and when it came time to start porting them into Scriptable objects in our Unity project, I decided I would rather spend some time trying to automate this process. The goal of this was simply to allow us to use the Google Sheet as our card database, and have the Unity project automatically populate its internal Scriptables folder with the appropriate card Scriptables based on the data present in the Sheet. The first step I took was determining how to get Google Sheets and Unity to talk to each other. After some initial research, I determined that there were two possible courses of action - I could utilize Google's C# API to access Google Sheets directly with Unity, or I could write a Python script using Google Sheet's API that acted as a sort of middle-man between the two services. There were several fact...