Skip to content

Instantly share code, notes, and snippets.

@taibenvenuti
Created March 12, 2017 10:26
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save taibenvenuti/a01f6977047692af0512f1f8c4bac610 to your computer and use it in GitHub Desktop.
Save taibenvenuti/a01f6977047692af0512f1f8c4bac610 to your computer and use it in GitHub Desktop.
var propsList = new List<string>();
var props = Resources.FindObjectsOfTypeAll<PropInfo>();
for (uint i = 0; i < props.Length; i++)
{
var prop = props[i];
if (prop == null) continue;
Debug.Log(prop);
propsList.Add(prop.ToString() + ". Category: " + prop.category + ". Class: " + prop.m_class + ". Name: " + prop.name);
}
propsList.Sort();
var s = props.Length + " props found...\n\n";
foreach (var item in propsList)
{
s = s + item + "\n";
}
var path = Path.Combine(ColossalFramework.IO.DataLocation.addonsPath, "PropsList.txt");
File.WriteAllText(path, s);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment