示例#1
0
        public static void dump(this GameObject go, string filename = null, int dumpParent = 0)
        {
            while (dumpParent-- > 0 && go.getParent())
            {
                go = go.getParent();
            }

            filename ??= go.name.Replace("(Clone)", "").ToLower();
#if DEBUG
            Paths.ensurePath(pathForDumps);
            filename = pathForDumps + filename;
#endif
            ObjectDumper.dump(go, true, true).saveToFile(filename + ".yml");
        }
示例#2
0
        public static void dump(this GameObject go, string filename = null, int dumpParent = 0)
        {
            while (dumpParent > 0 && go.transform.parent)
            {
                go = go.transform.parent.gameObject;
                dumpParent--;
            }

            filename ??= go.name.Replace("(Clone)", "").ToLower();
#if DEBUG
            Directory.CreateDirectory(pathForDumps);
            filename = pathForDumps + filename;
#endif
            ObjectDumper.dump(go, true, true).saveToFile(filename + ".yml");
        }
示例#3
0
 public static string dumpGameObject(GameObject go, bool dumpProperties = true, bool dumpFields = false) =>
 ObjectDumper.dump(go, dumpProperties, dumpFields);