Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public class SendToThread
- {
- public int localID = 0;
- public string oldID;
- public string newID;
- public List<string> dependencyAssetPath = new List<string>();
- public string applicationPath;
- }
- public void Charlie()
- {
- //toUseData is a List<SendToThread>
- for (int i = 0 ; i < toUseData.Count; i++)
- {
- while (toUseData[i].dependencyAssetPath.Count >= 1)
- {
- string[] lines = File.ReadAllLines(toUseData[i].applicationPath + toUseData[i].dependencyAssetPath[0]);
- for (int e = 0; e < lines.Length; e++)
- {
- DebugVoid(lines.Length.ToString());
- lines[e].Replace(toUseData[i].oldID.ToString(), toUseData[i].newID.ToString());
- if (e == lines.Length - 1)
- {
- DebugVoid(toUseData[i].oldID.ToString() + " " + toUseData[i].newID.ToString());
- File.WriteAllLines(toUseData[i].applicationPath + toUseData[i].dependencyAssetPath[i], lines);
- }
- }
- toUseData[i].dependencyAssetPath.RemoveAt(0);
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement