- Home /
how to compare a texture2d file name with a string.
I have loaded all the texture in the array of objects. Now I want to match the filename with the string so texture can change accordingly. But the if the condition is not working . My filename is "a" and I have to match it with letter "a". Please help`
private UnityEngine.Object[] frames; public string gameword;
if (frames [m].ToString()== gameword [n - 1].ToString()`
Comment
Your answer
![](https://koobas.hobune.stream/wayback/20220612044810im_/https://answers.unity.com/themes/thub/images/avi.jpg)