UnityWebRequest.Post connecting, not sending repsonses
I've made an app for making RPG characters, and it's supposed to send all of the collected data to a Google Sheet through a Google Form. The data is getting sent toe the script object, and when I activate the button that calls that method to send it to the Google Sheet, I can see that the sheet is getting a timestamp response, so I know that, at its core, it's connecting. But the fields are not being populated with any sample data. I get the timestamp and no other data.
I can't figure out where my code is not working. Here's what I have:
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;
using UnityEngine.Networking;
public class SendToGoogle : MonoBehaviour
{
public string playerNameInput;
public string playerPronounsInput;
//about another 140 lines of input like this that I'm collecting follow...this is the raw data being sent over from a master collection script.
[SerializeField] string playerName;
[SerializeField] string playerPronouns;
//this is also repeated to match the data collected above
string BASE_URL = "https://docs.google.com/forms/...."; //the whole link is here, just redacting it
//The activation button sends the data to the first set of strings, then calls this method to convert it all to serialized fields, and then calls the "Send" method
public void PopulateData()
{
playerName = playerNameInput;
playerPronouns = playerPronounsInput;
//repeated for each data line
Send()
}
IEnumerator Post(string playerName, string playerPronouns, ...)
{
WWWForm form = new WWWForm();
form.AddField("1508626901", playerName);
form.AddField("1510511441", playerPronouns);
//I've double and triple checked the entry code, and I don't think that this is where the mistake is, but it also seems to be the most logical explanation
UnityWebRequest www = UnityWebRequest.Post(BASE_URL, form);
yield return www.SendWebRequest();
}
}
Your answer
Follow this Question
Related Questions
Array index is out of range. c# 2 Answers
Randomize text position for 2D Quiz C# 0 Answers
When I crouch and move at the same time the player jitters? 0 Answers
uNet: Failed to send internal buffer 0 Answers