Skip to content

Instantly share code, notes, and snippets.

Last active November 15, 2020 23:21
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
What would you like to do?
Lists all networks in a text file.
var prefabNames = new List<string>();
for (uint i = 0; i < PrefabCollection<NetInfo>.LoadedCount(); i++)
var prefab = PrefabCollection<NetInfo>.GetLoaded(i);
if (prefab == null) continue;
var s="\n";
foreach(var name in prefabNames)
s = s + name + "\n";
var path = Path.Combine(ColossalFramework.IO.DataLocation.addonsPath, "NetworksList.txt");
File.WriteAllText(path, s);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment