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"); }
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"); }
public static string dumpGameObject(GameObject go, bool dumpProperties = true, bool dumpFields = false) => ObjectDumper.dump(go, dumpProperties, dumpFields);