forked from K0lb3/UnityPy
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathPlayerSettings.py
More file actions
29 lines (26 loc) · 1.21 KB
/
PlayerSettings.py
File metadata and controls
29 lines (26 loc) · 1.21 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
from .Object import Object
class PlayerSettings(Object):
def __init__(self, reader):
super().__init__(reader=reader)
version = self.version
if version >= (5, 4): # 5.4.0 nad up
self.productGUID = reader.read_bytes(16)
self.AndroidProfiler = reader.read_boolean()
# bool AndroidFilterTouchesWhenObscured 2017.2 and up
# bool AndroidEnableSustainedPerformanceMode 2018 and up
reader.align_stream()
self.defaultScreenOrientation = reader.read_int()
self.targetDevice = reader.read_int()
if version < (5, 3): # 5.3 down
if version < (5,): # 5.0 down
self.targetPlatform = reader.read_int() # 4.0 and up targetGlesGraphics
if version >= (4, 6): # 4.6 and up
self.targetIOSGraphics = reader.read_int()
self.targetResolution = reader.read_int()
else:
self.useOnDemandResources = reader.read_boolean()
reader.align_stream()
if version >= (3, 5): # 3.5 and up
self.accelerometerFrequency = reader.read_int()
self.companyName = reader.read_aligned_string()
self.productName = reader.read_aligned_string()