Hello,
I would like to save text to input field by clicking a button. My aim is to make form which is easier to fill. There is a inputfield for gender. Now players have to fill it by writing. I would like it to work so that I have two buttons. Other button is man and other is women. So the player can just click a button instead of writing his or her´s gender. With the script below text appears to screen. How can I modify it so it saves the gender to inputfield? I would apprecieate any guidance. Cheers.
I
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;
public class textBtn : MonoBehaviour
{
public Text mytext = null;
public int counter = 0;
public void changeText()
{
counter++;
if (counter % 2 == 1)
{
mytext.text = "man";
}
}
}