Skip to content

CaptainKryga/GoogleForms-Feedback-System-for-Unity

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

📝 Google Forms Feedback System for Unity 🎮

Unity License Platform

A simple yet powerful solution for collecting user feedback in Unity games via Google Forms 📊

YouTube Watch the video on this repository here

✨ Features

  • 🚀 Easy integration into any Unity project
  • 📤 Submit text data and numerical ratings
  • 🛠️ Fully customizable form fields
  • ⚡ Asynchronous data submission
  • 📚 Ready-to-use examples
  • 🔒 Works with Unitask, but only for example

🏁 Quick Start

1️⃣ Google Forms Setup

  1. Create a new form at Google Forms
  2. Add your desired fields (questions)
  3. Get the form ID from URL: https://docs.google.com/forms/u/0/d/e/FORM_ID/formResponseor simply replace the link after the form response
  4. Obtain entry.ID for each field (see "How to Get entry.ID" below)

2️⃣ Unity Implementation

Add the Service folder (Assets/Project/Scripts/Service) to your project. Add the Model folder (Assets/Project/Scripts/Model) to your project.

using Cysharp.Threading.Tasks;
using Project.Scripts.Model;
using UnityEngine;
using UnityEngine.Networking;

namespace Project.Scripts.Service
{
    public class GoogleFormFeedbackService : IFeedbackService
    {
        private const string FormUrl = "https://docs.google.com/forms/u/0/d/e/1FAIpQLSehZvUwuIwbBne24YLoxULlk4L6ctbd9LNt6VS9M5oxcGsmjA/formResponse";
        
        public async UniTask<bool> SubmitFeedback(FeedbackData feedbackData)
        {
            WWWForm form = new WWWForm();
            form.AddField("entry.485273778", feedbackData.Message);

            using UnityWebRequest www = UnityWebRequest.Post(FormUrl, form);
            await www.SendWebRequest().ToUniTask();
            return www.result == UnityWebRequest.Result.Success;
        }
    }
}

3️⃣ Usage Example

FeedbackData feedbackData = new FeedbackData("Description from google forms");
bool isSuccess = await _feedbackService.SubmitFeedback(feedbackData);

🔍 How to Get entry.ID

  1. Open your Google Form
  2. Open developer tools (F12 or Ctrl+U or ...)
  3. Submit the completed form to be able to get links
  4. Search for entry. in the HTML
  5. The numbers after entry. are your field IDs (e.g., entry.123456789)

🛠️ Customization Tips

// Add device information
form.AddField("entry.555555555", SystemInfo.deviceModel);

// Add game version
form.AddField("entry.666666666", Application.version);

// Add timestamp
form.AddField("entry.777777777", System.DateTime.Now.ToString());

📋 Recommended Form Structure

  • (entry.111111) Rating (1-5 scale) ⭐⭐⭐⭐⭐
  • (entry.222222) Feedback comments ✏️
  • (entry.333333) Email (optional) 📧
  • (entry.444444) Feedback type (Bug/Feature Request/Other) 🐞💡

📜 License

MIT License - Feel free to use and modify! See LICENSE for details.

💖 Support Project

Love this tool? Support its development:

About

lessonYoutube012-Feedback-form

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages