Beispiel #1
0
        static public TypeTreeDataBase GenerateTypeTreeDataBase(SerializeAssetV09 asset)
        {
            TypeTreeDataBase DB = new TypeTreeDataBase();

            foreach (var typetree in asset.typeTrees)
            {
                var tree = GenerateTypeTreeV9(typetree.rootType);
                DB.Put(9, typetree.ClassID, tree);
                //Console.WriteLine(tree);
            }
            return(DB);
        }
Beispiel #2
0
 public void Init(SerializeAssetV09 serializeAsset)
 {
     AssetVersion = serializeAsset.header.Version;
     UnityVersion = serializeAsset.UnityVersion;
     ObjectInfos = new AssetObjectInfo[serializeAsset.numOfObjects];
     for (int i = 0; i < serializeAsset.numOfObjects; i++) {
         ObjectInfos[i] = new AssetObjectInfo();
         ObjectInfos[i].PathID = (ulong)serializeAsset.objectInfos[i].PathID;
         ObjectInfos[i].classID = serializeAsset.objectInfos[i].classID;
         ObjectInfos[i].typeID = serializeAsset.objectInfos[i].typeID;
         ObjectInfos[i].isDestroyed = serializeAsset.objectInfos[i].isDestroyed == 1;
         ObjectInfos[i].length = serializeAsset.objectInfos[i].length;
         ObjectInfos[i].data = serializeAsset.objectInfos[i].data;
     }
     ExternalFiles = new FileIdentifier[serializeAsset.numOfFileIdentifiers];
     for (int i = 0; i < serializeAsset.numOfFileIdentifiers; i++) {
         ExternalFiles[i] = new FileIdentifier();
         ExternalFiles[i].filePath = serializeAsset.fileIdentifiers[i].filePath;
     }
 }
Beispiel #3
0
 public void Init(SerializeAssetV09 serializeAsset)
 {
     AssetVersion = serializeAsset.header.Version;
     UnityVersion = serializeAsset.UnityVersion;
     ObjectInfos  = new AssetObjectInfo[serializeAsset.numOfObjects];
     for (int i = 0; i < serializeAsset.numOfObjects; i++)
     {
         ObjectInfos[i]             = new AssetObjectInfo();
         ObjectInfos[i].PathID      = (ulong)serializeAsset.objectInfos[i].PathID;
         ObjectInfos[i].classID     = serializeAsset.objectInfos[i].classID;
         ObjectInfos[i].typeID      = serializeAsset.objectInfos[i].typeID;
         ObjectInfos[i].isDestroyed = serializeAsset.objectInfos[i].isDestroyed == 1;
         ObjectInfos[i].length      = serializeAsset.objectInfos[i].length;
         ObjectInfos[i].data        = serializeAsset.objectInfos[i].data;
     }
     ExternalFiles = new FileIdentifier[serializeAsset.numOfFileIdentifiers];
     for (int i = 0; i < serializeAsset.numOfFileIdentifiers; i++)
     {
         ExternalFiles[i]          = new FileIdentifier();
         ExternalFiles[i].filePath = serializeAsset.fileIdentifiers[i].filePath;
     }
 }
 static private TypeTree GenerateTypeTreeV9(SerializeAssetV09.SerializeTypeTreeData tree)
 {
     TypeTree root = new TypeTree();
     root.name = tree.name;
     root.type = tree.type;
     root.metaFlag = tree.metaFlag;
     foreach (var childType in tree.children) {
         var childTree = GenerateTypeTreeV9(childType);
         root.AddChild(childTree);
     }
     return root;
 }
 static public TypeTreeDataBase GenerateTypeTreeDataBase(SerializeAssetV09 asset)
 {
     TypeTreeDataBase DB = new TypeTreeDataBase();
     foreach (var typetree in asset.typeTrees) {
         var tree = GenerateTypeTreeV9(typetree.rootType);
         DB.Put(9, typetree.ClassID, tree);
         //Console.WriteLine(tree);     
     }
     return DB;
 }