public int SaveTextures(string word) { int x = 0; string[] isolatedName; foreach (string fileName in FileAccessUtil.SaveWordPics(textureList, word)) { if (!wordImageNames.Contains(fileName)) { isolatedName = Regex.Split(fileName, PNG_PATTERN); Debug.Log("Saving textures, isolated file name is " + isolatedName[1]); wordImageNames.Add(isolatedName[1]); x += 1; } } return(x); }