织梦CMS - 轻松建站从此开始!

欧博ABG官网-欧博官方网址-会员登入

欧博Sheets: Seamless integration of Unity3D to the G

时间:2025-08-05 23:06来源: 作者:admin 点击: 10 次
Seamless integration of Unity3D to the Google Sheets API for quick-and-dirty data handling. - dorktoast/Unity-To-Google-Sheets

License: MIT

GitHub followers

Twitter Follow

Discord

Unity-Google Sheets integration

This repo created a seamless Unity-Google Sheets integration using a simple API for a Google Spreadsheet using Google Apps Script, allowing for basic CRUD (Create, Read, Update, Delete) operations through a web interface.

This guide provides a step-by-step process to integrate Unity with Google Sheets, allowing Unity developers to send playtest data directly to a Google Sheet using Google Apps Script. This can be particularly useful for collecting playtester feedback, environment data, and more.

Key Concepts

Parameter Handling: The script uses the e.parameter object to access GET request parameters.

Sheet Access: Dynamically selects sheets based on request parameters, with a fallback to the 'Master' sheet.

Data Manipulation: Demonstrates adding and retrieving data, showcasing how to handle variable data fields.

Error Handling: Basic error handling by returning specific messages for invalid actions or when data cannot be found.

How to

Creating the Custom Function in Google Sheets

Open Your Google Sheet: In the Google Sheet where you're working, go to Extensions > Apps Script.

Set up the columns for data you wish to collect (e.g., Email, Playtest Key, Status, NickName).

Note the URL of your Google Sheet, you'll need it for your Unity script.

Import Script: Import the PlaytestData.gs script.

Modify the script as needed to fit your specific data collection requirements.

Save the AppsScript.

Deploy: In the Google Apps Script editor, click on Deploy > New deployment. Select Web app as the deployment type. Fill in the details, set Who has access to Anyone, and click Deploy.

Copy the web app URL provided after deployment.

Importing into Unity

Dependency: Import Odin Serializer from github or Odin Inspector asset. (You can alternately populate your playtest Dictionary manually.)

Import the two scripts in this repo into your unity project.

Replace the placeholder URL in SHEETS_APP_URL with the URL of your Google Apps Script web app from the previous section.

Attach the script to a GameObject in your Unity scene to start using it.

Test it!

Run your Unity project and perform actions that trigger the script to send data to Google Sheets.

Check your Google Sheet to see if the data appears as expected.

Protips

Customize the Unity and Google Apps Script code as necessary to fit your project's specific needs.

Ensure you follow Google's guidelines and limitations for Apps Script and web app deployments.

Always follow applicable laws related to data collection from users, including playtesters.

(责任编辑:)
------分隔线----------------------------
发表评论
请自觉遵守互联网相关的政策法规,严禁发布色情、暴力、反动的言论。
评价:
表情:
用户名: 验证码:
发布者资料
查看详细资料 发送留言 加为好友 用户等级: 注册时间:2025-08-08 11:08 最后登录:2025-08-08 11:08
栏目列表
推荐内容