Search in sources :

Example 1 with UnityHash128

use of info.ata4.junity.UnityHash128 in project disunity by ata4.

the class TypeTreeV3 method read.

@Override
public void read(DataReader in) throws IOException {
    revision = new UnityVersion(in.readStringNull(255));
    attributes = in.readInt();
    embedded = in.readBoolean();
    int numBaseClasses = in.readInt();
    for (int i = 0; i < numBaseClasses; i++) {
        int classID = in.readInt();
        TypeRoot typeRoot = new TypeRoot();
        typeRoot.classID(classID);
        if (classID < 0) {
            UnityHash128 scriptID = new UnityHash128();
            in.readStruct(scriptID);
            typeRoot.scriptID(scriptID);
        }
        UnityHash128 oldTypeHash = new UnityHash128();
        in.readStruct(oldTypeHash);
        typeRoot.oldTypeHash(oldTypeHash);
        if (embedded) {
            Node<T> node = new Node<>();
            readNode(in, node);
            typeRoot.nodes(node);
        }
        typeMap.put(classID, typeRoot);
    }
}
Also used : Node(info.ata4.util.collection.Node) UnityVersion(info.ata4.junity.UnityVersion) UnityHash128(info.ata4.junity.UnityHash128)

Aggregations

UnityHash128 (info.ata4.junity.UnityHash128)1 UnityVersion (info.ata4.junity.UnityVersion)1 Node (info.ata4.util.collection.Node)1