I need help with input fields. I already set the line type to 'Multi_Line NewLine' in inspector, but I have problem with submitting the string. Here's the code:
using UnityEngine;
using System.Collections;
using UnityEngine.UI;
public class GameController : MonoBehaviour {
public string code;
public string code1;
[SerializeField]
public InputField input;
public void Check(string guess)
{
if (string.Equals (guess,code)) {
Debug.Log ("correct");
} else
Debug.Log ("wrong");
}
public void GetInput(string guess)
{
Check (guess);
input.text = "";
}
}
I want to have both 'code' and 'code1' strings to be inserted in different lines inside the same input field but I don't know how to check both 'code' and 'code1' string value inside the Check(). Any help would be appreciated.
System.Environment.NewLine;
\$\endgroup\$