// Token: 0x06000001 RID: 1 RVA: 0x0000205C File Offset: 0x0000025C public void Awake() { R2API.AssetAPI.AssetLoaderReady += delegate(object s, EventArgs e) { string text = Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location) + "/Prefabs/"; string text2 = ""; base.Logger.LogInfo(text); text2 = text2 + text + "\n"; ExamplePlugin.types = new List <Type>(); try { text2 += "create Directory\n"; Directory.CreateDirectory(text); text2 += "for each\n"; string text3; foreach (GameObject gameObject in Resources.LoadAll <GameObject>("Prefabs/")) { Component[] components = gameObject.GetComponents <Component>(); text3 = ""; text3 = text3 + gameObject.name + "\n"; text3 += ExamplePlugin.OutputComponents(components, ">"); text3 += ExamplePlugin.GetChildren(gameObject.transform, ">"); File.WriteAllText(text + gameObject.name + ".txt", text3); } text2 += "types\n"; text3 = ""; text3 += "\n\ntypes\n\n"; for (int j = 0; j < ExamplePlugin.types.Count; j++) { MemberInfo[] members = ExamplePlugin.types[j].GetMembers(); text3 = text3 + ExamplePlugin.types[j].Name + "\n"; for (int k = 0; k < members.Length; k++) { if (!(members[k].DeclaringType.Name == "MonoBehaviour") && !(members[k].DeclaringType.Name == "Component") && !(members[k].DeclaringType.Name == "Behaviour") && !(members[k].DeclaringType.Name == "Object")) { text3 = string.Concat(new string[] { text3, "> ", members[k].MemberType.ToString(), ": ", members[k].Name, "\n" }); } } } File.WriteAllText(text + "types.txt", text3); } catch (Exception ex) { text2 += ex.ToString(); } File.WriteAllText(text + "log.txt", text2); }; }
// Token: 0x06000004 RID: 4 RVA: 0x00002484 File Offset: 0x00000684 public static string GetChildren(Transform transform, string delimi) { string text = ""; for (int i = 0; i < transform.childCount; i++) { GameObject gameObject = transform.GetChild(i).gameObject; text = string.Concat(new string[] { text, delimi, "c ", gameObject.name, "\n" }); Component[] components = gameObject.GetComponents <Component>(); text += ExamplePlugin.OutputComponents(components, delimi + ">"); text += ExamplePlugin.GetChildren(transform.GetChild(i), delimi + ">"); } return(text); }