User Feedback Survey (updated) - How to Send Unity Data to Google Forms using UnityWebRequest

  Рет қаралды 15,208

1Min Unity Tutorials

1Min Unity Tutorials

Күн бұрын

using System.Collections;
using UnityEngine;
using UnityEngine.Networking;
using UnityEngine.UI;
public class Survey : MonoBehaviour
{
[SerializeField] InputField feedback1;
string URL = "";
public void Send()
{
StartCoroutine(Post(feedback1.text));
}
IEnumerator Post(string s1)
{
WWWForm form = new WWWForm();
form.AddField("", s1);
UnityWebRequest www = UnityWebRequest.Post(URL, form);
yield return www.SendWebRequest();
}
}

Пікірлер: 46
@NicholasAYam
@NicholasAYam 3 жыл бұрын
Hey Mate, your video was detailed and concise! Can't thank you enough! Great work!
@css2014
@css2014 3 жыл бұрын
That was exactly what I needed. Thank you.
@gitaecookiemonster2892
@gitaecookiemonster2892 Жыл бұрын
OMG this is it, this is what I was looking for! Thank you so much! .. 오 근데 한국인이신 것 같네요? ㅎㅎㅎ암튼 넘 감사합니다~!!! >
@MegaJHONDY
@MegaJHONDY 2 жыл бұрын
I'm sad to see this dude doesn't have more videos 😭
@dangerClose-ij4fj
@dangerClose-ij4fj 7 ай бұрын
Oh thanks bro you really saved my life
@brauliojorgealmeida
@brauliojorgealmeida 2 жыл бұрын
Damn! This is gold! Thank you so much!
@asgorathalpha8316
@asgorathalpha8316 Ай бұрын
This was exactly what I needed. Do you by chance know what would need to be different if I do a multiple choice option?
@G_Elektrik
@G_Elektrik 2 жыл бұрын
This comment is for all wondering how to make it work with toggles or a form made for questions with multiple answers. I don't think there is info online about it. Let's say you have a form with the question: "favorite animal", with multiple answers: "cat" "dog" "bear", in unity you set your toggles in the same way, if a user clicks the toggle "cat" you can use in that particular toggle -onvaluechanged- and for example take the name of the toggle to identify it, and in your code for the value of that entry.XXXXXXX you have to pass that word as a string just like you have it in your form: "cat" in order to fill a question with multiple answers.
@G_Elektrik
@G_Elektrik 2 жыл бұрын
@@full_bladder well i dont know if i explained my self well, but is not dificult, work almost same as this video, but you have to send the string for that entry with the exact text of the answer, i mean, lets say you have a form with a question with 3 answers, 1 cat 2 dog 3 bear, if in unity a person pick cat, you have to send the string with the text exactly like you have it in your form cat, the form recognice like if you choose cat and not the others. The way your code work in unity to recognize what toggle user is choosing is up to you, there are multiple methods, for example for the name of togle presed, or the function on value change or whatever you like.
@peliculasyseriespopulares5992
@peliculasyseriespopulares5992 5 ай бұрын
Oye puedo contactarme contigo???
@G_Elektrik
@G_Elektrik 5 ай бұрын
@@peliculasyseriespopulares5992 yes
@G_Elektrik
@G_Elektrik 5 ай бұрын
@@peliculasyseriespopulares5992 yes
@MatheusWillian95
@MatheusWillian95 7 ай бұрын
Nostalgia - CLAIR DE LUNE!
@kalechips965
@kalechips965 3 жыл бұрын
I get a 405 Method Not Allowed error when I attempt this. Any help would be greatly appreciated!
@kalechips965
@kalechips965 3 жыл бұрын
public GameObject TestField; private string input; private string baseURL = "docs.google.com/forms/d/xxx/formResponse"; IEnumerator Post(string input) { WWWForm form = new WWWForm(); form.AddField("entry.xxx", "test"); UnityWebRequest uwr = UnityWebRequest.Post(baseURL, form); yield return uwr.SendWebRequest(); if (uwr.isNetworkError || uwr.isHttpError) { Debug.Log(uwr.error); } else { Debug.Log("Post Request Complete!"); } Debug.Log(uwr.downloadHandler.text); } public void Send() { input = TestField.GetComponent().text; StartCoroutine(Post(input)); }
@SF.Carlos
@SF.Carlos Жыл бұрын
Which version of Unity are you using? I tried this method in v.2021.3.6f1 and the UI "InputField" cannot be dragged to the Feedback 1 field under the Survey Script (component) in the inspector.
@erdmaennchen105
@erdmaennchen105 Жыл бұрын
It worked, thanks
@drcatzill8955
@drcatzill8955 3 жыл бұрын
Just what I needed! Thanks a lot for this man!
@xyhd0268
@xyhd0268 3 жыл бұрын
Wow
@fightclubmusic
@fightclubmusic 5 ай бұрын
actually thank you
@markezekieladona4689
@markezekieladona4689 2 жыл бұрын
Hey bro the video was cut at the last part, do you have a continuation for this?
@tacticalmythic7945
@tacticalmythic7945 3 жыл бұрын
thanks so much mate
@PlayHolicGAMES
@PlayHolicGAMES 5 ай бұрын
can we use different types like check boxes
@wilburdongchinyu2627
@wilburdongchinyu2627 3 жыл бұрын
Hi can you share more on how i can add on more questions and then upload the answers to the google form? Great tutorial btw!
@dr.araujo-junior
@dr.araujo-junior 3 жыл бұрын
thank you so much! But I still need the toggle... The video cut out in the end... T_T
@CriarGames
@CriarGames 2 жыл бұрын
Argument 1: Cannot convert from "System.Collections.IEnumerable" to "string" [Assembly-CSharp]csharp(CS1503) 😟😟
@uggaming6317
@uggaming6317 3 жыл бұрын
Thank you
@maurincito
@maurincito 3 жыл бұрын
thanks a lot..!!!!
@queenb3730
@queenb3730 Жыл бұрын
How would you do this with Google Sheets instead of Forms?
@brandonbell3133
@brandonbell3133 11 ай бұрын
Which version of Unity is ideal for this? Does it still work with Unity 2022/2023? How can we prevent exact duplicates? Any way to add a Name field alongside the Feedback input field, so they can submit their name or email along with their feedback?
@peliculasyseriespopulares5992
@peliculasyseriespopulares5992 5 ай бұрын
Lograste hacerlo ? Te funcionó su tutorial ?
@uview920
@uview920 2 жыл бұрын
감사합니다 :)
@1minunitytutorials720
@1minunitytutorials720 2 жыл бұрын
;)
@PhilM4
@PhilM4 Жыл бұрын
​​@@1minunitytutorials720Hi, you said the code would be included in the description, but the toggle options aren't available and the code for the toggle wasn't shown fully in the video. Please help 😢
@nvolina
@nvolina 2 жыл бұрын
Hi, anyway you can show the toggle script as well? Thank you :)
@1minunitytutorials720
@1minunitytutorials720 2 жыл бұрын
Hello! I am sorry but I don't have the project now :( , and I barely remember what I did at that time. But I think I just sent the String value of the number corresponding to toggle like I did for the text. So for example, if user clicks the first toggle, it sends "1", etc.
@harrymartin2188
@harrymartin2188 Жыл бұрын
I need multiple questions and I cant get it working, any help at all?
@Luluskuy
@Luluskuy Жыл бұрын
Hi! I can help you with multiple question if you still need it.
@harrymartin2188
@harrymartin2188 Жыл бұрын
@@Luluskuy I just chose to use google forms in the end without it on unity. Although any help would be brilliant for further uses
@ianlelis7757
@ianlelis7757 7 ай бұрын
​@@LuluskuyHello!, Can you help me?, I need 5-10 Questions with multiple choices answers.
@JUANZ503
@JUANZ503 2 жыл бұрын
EASY
@stephanogoncalves1672
@stephanogoncalves1672 2 ай бұрын
Did not work for me
@stephanogoncalves1672
@stephanogoncalves1672 2 ай бұрын
Solution: uncheck the "Limit to 1 response" option in the form.
@trilingual6616
@trilingual6616 3 жыл бұрын
01:16 Canadian moment. Welcome to the north
@VinayKumar-lz8ik
@VinayKumar-lz8ik Жыл бұрын
😂
@stephenkimani7397
@stephenkimani7397 3 жыл бұрын
Just what I needed! Thanks a lot for this man!
Unity to Google Spreadsheet - Sending Data the Easy Way
13:29
One Wheel Studio
Рет қаралды 2,9 М.
AI can't cross this line and we don't know why.
24:07
Welch Labs
Рет қаралды 329 М.
Teaching a Toddler Household Habits: Diaper Disposal & Potty Training #shorts
00:16
How to Send an Email or Text Message in C# with Unity
16:43
wolfs cry games
Рет қаралды 15 М.
Collecting User Feedback in Unity (Google Forms & Email)
15:44
Matthew Ventures
Рет қаралды 8 М.
The most useless degrees…
11:29
Shane Hummus
Рет қаралды 4 МЛН
Better Save/Load using Data Binding in Unity
18:47
git-amend
Рет қаралды 13 М.
Google Forms Tutorial
29:15
Kevin Stratvert
Рет қаралды 1,2 МЛН
Simple Survey Form | Unity GameDev Techinque
26:27
Abhinav a.k.a Demkeys
Рет қаралды 18 М.
How to Host Unity a Webgl Game on Github for Free
3:57
Max O'Didily
Рет қаралды 7 М.
Download Data/Images from inside Unity (HTTP WebRequest)
16:05
Code Monkey
Рет қаралды 38 М.
Teaching a Toddler Household Habits: Diaper Disposal & Potty Training #shorts
00:16