@@ -16,12 +16,11 @@ public sealed class SerializedType
1616 public Hash128 TypeHash ;
1717 public bool IsRefType ;
1818 public List < TypeTreeNode > ? Nodes ;
19- public TypeTreeNode ? TypeTree ;
2019 public byte [ ] ? StringBufferBytes ;
2120 public int [ ] ? TypeDependencies ;
2221 public SerializedTypeReference ? TypeReference ;
2322
24- public SerializedType ( Int32 typeId , bool isStrippedType , Int16 scriptTypeIndex , Hash128 ? scriptIdHash , Hash128 typeHash , bool isRefType , List < TypeTreeNode > ? nodes , byte [ ] ? stringBufferBytes , TypeTreeNode ? typeTree , int [ ] ? typeDependencies , SerializedTypeReference ? typeReference )
23+ public SerializedType ( Int32 typeId , bool isStrippedType , Int16 scriptTypeIndex , Hash128 ? scriptIdHash , Hash128 typeHash , bool isRefType , List < TypeTreeNode > ? nodes , byte [ ] ? stringBufferBytes , int [ ] ? typeDependencies , SerializedTypeReference ? typeReference )
2524 {
2625 TypeID = typeId ;
2726 IsStrippedType = isStrippedType ;
@@ -30,7 +29,6 @@ public SerializedType(Int32 typeId, bool isStrippedType, Int16 scriptTypeIndex,
3029 TypeHash = typeHash ;
3130 IsRefType = isRefType ;
3231 Nodes = nodes ;
33- TypeTree = typeTree ;
3432 StringBufferBytes = stringBufferBytes ;
3533 TypeDependencies = typeDependencies ;
3634 TypeReference = typeReference ;
@@ -67,17 +65,6 @@ public static SerializedType Parse(DataBuffer db, SerializedFileFormatVersion ve
6765 if ( nodes [ 0 ] . Level != 0 )
6866 throw new Exception (
6967 $ "The first node of TypeTreeNodes should have a level of 0 but gets { nodes [ 0 ] . Level } ") ;
70- var parent = nodes [ 0 ] ;
71- for ( int i = 1 ; i < typeTreeNodeCount ; i ++ )
72- {
73- while ( nodes [ i ] . Level <= parent . Level )
74- parent = parent . Parent ;
75- nodes [ i ] . Parent = parent ;
76- parent . Children ??= new ( ) ;
77- parent . Children . Add ( nodes [ i ] ) ;
78- parent = nodes [ i ] ;
79- }
80- typeTree = nodes [ 0 ] ;
8168 if ( version >= StoresTypeDependencies )
8269 {
8370 if ( isRefType )
@@ -86,7 +73,7 @@ public static SerializedType Parse(DataBuffer db, SerializedFileFormatVersion ve
8673 typeDependencies = db . ReadIntArray ( db . ReadInt32 ( ) ) ;
8774 }
8875 }
89- return new SerializedType ( typeID , isStrippedType , scriptTypeIndex , scriptIdHash , typeHash , isRefType , nodes , stringBufferBytes , typeTree , typeDependencies , typeReference ) ;
76+ return new SerializedType ( typeID , isStrippedType , scriptTypeIndex , scriptIdHash , typeHash , isRefType , nodes , stringBufferBytes , typeDependencies , typeReference ) ;
9077 }
9178
9279 private static string ReadString ( DataBuffer db , uint value )
0 commit comments