forked from K0lb3/UnityPy
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMonoScript.py
More file actions
23 lines (19 loc) · 860 Bytes
/
MonoScript.py
File metadata and controls
23 lines (19 loc) · 860 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
from .NamedObject import NamedObject
class MonoScript(NamedObject):
def __init__(self, reader):
super().__init__(reader=reader)
version = self.version
if version >= (3, 4): # 3.4 and up
self.m_ExecutionOrder = reader.read_int()
if version < (5,): # 5.0 down
self.m_PropertiesHash = reader.read_u_int()
else:
self.m_PropertiesHash = reader.read_bytes(16)
if version < (3,): # 3.0 down
self.m_PathName = reader.read_aligned_string()
self.m_ClassName = reader.read_aligned_string()
if version >= (3,): # 3.0 and up
self.m_Namespace = reader.read_aligned_string()
self.m_AssemblyName = reader.read_aligned_string()
if version < (2018, 2): # 2018.2 down
self.m_IsEditorScript = reader.read_boolean()