Advertisement
Guest User

Untitled

a guest
Oct 2nd, 2014
183
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.09 KB | None | 0 0
  1. public class SendToThread
  2. {
  3. public int localID = 0;
  4. public string oldID;
  5. public string newID;
  6. public List<string> dependencyAssetPath = new List<string>();
  7. public string applicationPath;
  8. }
  9.  
  10. public void Charlie()
  11. {
  12. //toUseData is a List<SendToThread>
  13. for (int i = 0 ; i < toUseData.Count; i++)
  14. {
  15. while (toUseData[i].dependencyAssetPath.Count >= 1)
  16. {
  17. string[] lines = File.ReadAllLines(toUseData[i].applicationPath + toUseData[i].dependencyAssetPath[0]);
  18.  
  19. for (int e = 0; e < lines.Length; e++)
  20. {
  21. DebugVoid(lines.Length.ToString());
  22. lines[e].Replace(toUseData[i].oldID.ToString(), toUseData[i].newID.ToString());
  23.  
  24. if (e == lines.Length - 1)
  25. {
  26. DebugVoid(toUseData[i].oldID.ToString() + " " + toUseData[i].newID.ToString());
  27. File.WriteAllLines(toUseData[i].applicationPath + toUseData[i].dependencyAssetPath[i], lines);
  28. }
  29. }
  30. toUseData[i].dependencyAssetPath.RemoveAt(0);
  31. }
  32. }
  33. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement