コード例 #1
0
ファイル: Printer.cs プロジェクト: Marteen21/Bellona_Console
        public void Print(GameObject go) {
            Type type = go.GetType();
            PropertyInfo[] properties = type.GetProperties();
            Console.WriteLine("Printing Info about a " + type.ToString());
            foreach (PropertyInfo property in properties) {
                if (property.Name.Contains("GUID")) {
                    Console.WriteLine(property.Name.ToString().PadRight(Paddistance) + String.Format("0x{0:X16}", property.GetValue(go, null)));

                }
                else if(property.Name.Contains("Address")){
                    uint temp = (uint)(UIntPtr)property.GetValue(go, null);
                    Console.WriteLine(property.Name.ToString().PadRight(Paddistance) + String.Format("0x{0:X8}", temp));
                }
                else {
                    Console.WriteLine(property.Name.ToString().PadRight(Paddistance) + property.GetValue(go, null));
                }
            }
            Print(go.Unit,3);
        }