good day i am trying to have two onclick events on one button. the first code would add the input fields to a google form but i want the other event to change scenes. This is what i have thus far
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;
public class sendtogoogle : MonoBehaviour {
public GameObject name;
public GameObject contactnumber;
public GameObject time;
public GameObject seating;
public GameObject email;
private string Name;
private string ContactNumber;
private string Time;
private string Seating;
private string Email;
[SerializeField]
private string BASE_URL = "https://docs.google.com/forms/d/e/1FAIpQLSeDQ2b7jBRRd8wsmLSOJY9vdhqLbMmBraVFi5FnzM__p3OBsg/formResponse";
IEnumerator Post (string name, string contactnumber, string time, string seating, string email){
WWWForm form = new WWWForm();
form.AddField ("entry.147709443",name);
form.AddField ("entry.1096821271",contactnumber);
form.AddField ("entry.98853131",time);
form.AddField ("entry.1504298736",seating);
form.AddField ("entry.1983788742",email);
byte[] rawData = form.data;
WWW www = new WWW(BASE_URL, rawData);
yield return www;
}
public void Send() {
Name = name.GetComponent<InputField> ().text;
ContactNumber = contactnumber.GetComponent<InputField> ().text;
Time = time.GetComponent<InputField> ().text;
Seating = seating.GetComponent<InputField> ().text;
Email = email.GetComponent<InputField> ().text;
StartCoroutine (Post (Name, ContactNumber, Time, Seating, Email));
}
}