File tree Expand file tree Collapse file tree 2 files changed +6
-2
lines changed Expand file tree Collapse file tree 2 files changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -7,7 +7,7 @@ import { AssetType } from './types';
7
7
export class AssetBundle extends AssetBase {
8
8
readonly type = AssetType . AssetBundle ;
9
9
readonly preloadTable : PPtr [ ] = [ ] ;
10
- readonly container : Array < PairData < string , AssetInfo > > = [ ] ;
10
+ readonly containers : Array < PairData < string , AssetInfo > > = [ ] ;
11
11
readonly containerMap = new Map < bigint , string > ( ) ;
12
12
13
13
constructor ( info : ObjectInfo , r : ArrayBufferReader ) {
@@ -20,7 +20,7 @@ export class AssetBundle extends AssetBase {
20
20
for ( let i = 0 ; i < containerSize ; i ++ ) {
21
21
const path = r . readAlignedString ( ) ;
22
22
const info = new AssetInfo ( this . __info , r ) ;
23
- this . container . push ( [ path , info ] ) ;
23
+ this . containers . push ( [ path , info ] ) ;
24
24
this . containerMap . set ( info . asset . pathId , path ) ;
25
25
}
26
26
}
Original file line number Diff line number Diff line change @@ -57,6 +57,10 @@ export abstract class AssetBase {
57
57
return this . __info . bytesSize ;
58
58
}
59
59
60
+ get container ( ) {
61
+ return this . __info . bundle . containerMap ?. get ( this . pathId ) ?? '' ;
62
+ }
63
+
60
64
protected get __class ( ) {
61
65
return AssetType [ this . type ] || 'unknown' ;
62
66
}
You can’t perform that action at this time.
0 commit comments