Exemplo n.º 1
0
        public void PrintHierarchy(string filename)
        {
            FileStream fs = File.OpenRead (filename);
            byte[] data = new byte[fs.Length];
            fs.Read (data, 0, data.Length);
            fs.Close ();

            FileStream fout = new FileStream (Path.ChangeExtension (filename, ".debug"), FileMode.OpenOrCreate);
            StreamWriter sw = new StreamWriter (fout);

            int offset = 0;
            while (offset < data.Length) {
                FltRecord record = new FltRecord (data, ref offset);
                sw.WriteLine(record.type + "\t" + record.GetName());
            }
            sw.Close ();
            fout.Close ();
        }
Exemplo n.º 2
0
 private void CreateNode(FltRecord record, FltRecordType type)
 {
     string name = record.GetName();
     GameObject node = new GameObject(type.ToString() + " " + name);
     if (currentParent != null) {
         node.transform.parent = currentParent.transform;
     }
     lastNode = node;
 }