Skip to content

Commit 916fea2

Browse files
committed
PPtr - re-add .type property
1 parent 8ac495f commit 916fea2

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

UnityPy/classes/PPtr.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
if TYPE_CHECKING:
77
from ..files.ObjectReader import ObjectReader
88
from ..files.SerializedFile import SerializedFile
9+
from ..enums.ClassIDType import ClassIDType
910

1011
T = TypeVar("T")
1112

@@ -15,7 +16,6 @@ class PPtr(Generic[T]):
1516
m_FileID: int
1617
m_PathID: int
1718
assetsfile: Optional[SerializedFile] = None
18-
type: Optional[str] = None
1919

2020
@property
2121
def file_id(self) -> int:
@@ -27,6 +27,10 @@ def path_id(self) -> int:
2727
# backwards compatibility
2828
return self.m_PathID
2929

30+
@property
31+
def type(self) -> ClassIDType:
32+
return self.deref().type
33+
3034
def read(self):
3135
# backwards compatibility
3236
return self.deref_parse_as_object()

0 commit comments

Comments
 (0)