I have a simple scene in unity where I have a canvas with an input field and the code I have is simple
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;
public class TextRecstriction : MonoBehaviour
{
public Text text;
public string a = "a";
public string b = "a";
public string c = "a";
public string d = "a";
public string e = "a";
public string f = "a";
public string g = "a";
public string h = "a";
public string i = "a";
public string j = "a";
public string k = "a";
public string l = "a";
public string m = "a";
public string n = "a";
public string o = "a";
public string p = "a";
public string q = "a";
public string r = "a";
public string s = "a";
public string t = "a";
public string u = "a";
public string v = "a";
public string w = "a";
public string x = "a";
public string y = "a";
public string z = "a";
// Update is called once per frame
void Update()
{
}
}
I want to add if statements to check if any of the letters are in the text element how do i go through the text to fetch if any of the strings are included in the text