forked from K0lb3/UnityPy
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathAssetBundle.py
More file actions
22 lines (18 loc) · 769 Bytes
/
Copy pathAssetBundle.py
File metadata and controls
22 lines (18 loc) · 769 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
from .NamedObject import NamedObject
from .PPtr import PPtr
class AssetInfo:
def __init__(self, reader):
self.preload_index = reader.read_int()
self.preload_size = reader.read_int()
self.asset = PPtr(reader)
class AssetBundle(NamedObject):
def __init__(self, reader):
super().__init__(reader=reader)
preload_table_size = reader.read_int()
self.m_PreloadTable = [PPtr(reader) for _ in range(preload_table_size)]
container_size = reader.read_int()
self.m_Container = {}
# TODO - m_Container is a multi-dict, multiple values can have the same key
for i in range(container_size):
key = reader.read_aligned_string()
self.m_Container[key] = AssetInfo(reader)