Hi,
I’m working on a code redeem system using ScriptableObject
and need help with the code.
?
I have the sciptabele part done but when checking the code I get debug for every code in the list. so want to know to make it for its good or not just give me for one. thanks
?
public CodeList codeList;
public TMP_InputField redeem_InutField;
public string code;
public void Redeem()
{
if (codeList != null)
{
for (int i = 0; i < codeList.codes.Length; i++)
{
if (code == codeList.codes[i].CodeName)
{
Debug.Log("Good Code");
}
else
{
Debug.Log("bad Code");
}
}
}
}