public void unsubstitute(Eq eqbefore, Eq eqafter) { string prevEq = currentEquation.print(); eqafter = eqafter.substitute(new Eq("★"), substitutions); eqafter = eqafter.substitute(new Eq("◎"), substitutionc); currentEquation = currentEquation.substitute(eqbefore, eqafter); if (!prevEq.Equals(currentEquation.print())) { currentEquation = currentEquation.substitute(new Eq("◎"), new Eq("★")); substitutions = substitutionc; starAvailable = true; currentFormula.text = currentEquation.print(); fullFormula.text += "\n" + currentEquation.print(); if (yexist) { if (eqbefore.print().Contains("x") || eqbefore.print().Contains("y")) { if (currentEquation.find(answer)) { pm.ProbSolved(); pm.transGlow.SetActive(false); for (int i = 0; i < 5; i++) { PracTranss[i].GetComponent <PracTrans>().eq = new Eq(""); PracTranss[i].GetComponent <PracTrans>().setEq(); } } } } else if (currentEquation.find(answer)) { pm.ProbSolved(); pm.transGlow.SetActive(false); for (int i = 0; i < 5; i++) { PracTranss[i].GetComponent <PracTrans>().eq = new Eq(""); PracTranss[i].GetComponent <PracTrans>().setEq(); } } else { pm.transGlow.SetActive(true); } } else { pm.ProbFailed(); } }