1 parent 8ac495f commit 916fea2Copy full SHA for 916fea2
1 file changed
UnityPy/classes/PPtr.py
@@ -6,6 +6,7 @@
6
if TYPE_CHECKING:
7
from ..files.ObjectReader import ObjectReader
8
from ..files.SerializedFile import SerializedFile
9
+ from ..enums.ClassIDType import ClassIDType
10
11
T = TypeVar("T")
12
@@ -15,7 +16,6 @@ class PPtr(Generic[T]):
15
16
m_FileID: int
17
m_PathID: int
18
assetsfile: Optional[SerializedFile] = None
- type: Optional[str] = None
19
20
@property
21
def file_id(self) -> int:
@@ -27,6 +27,10 @@ def path_id(self) -> int:
27
# backwards compatibility
28
return self.m_PathID
29
30
+ @property
31
+ def type(self) -> ClassIDType:
32
+ return self.deref().type
33
+
34
def read(self):
35
36
return self.deref_parse_as_object()
0 commit comments