You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+39-18Lines changed: 39 additions & 18 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -16,16 +16,24 @@ feel free to join the [UnityPy Discord](https://discord.gg/C6txv7M).
16
16
If you're using UnityPy for a commercial project,
17
17
a donation to a charitable cause or a sponsorship of this project is expected.
18
18
19
-
**As UnityPy is still in active development, breaking changes can happen.**
20
-
These changes are usually limited to minor versions (x.y) and not to patch versions (x.y.z).
21
-
So in case that you don't want to actively maintain your project,
22
-
make sure to make a note of the used UnityPy version in your README or add a check in your code.
23
-
e.g.
19
+
> [!NOTE]
20
+
> **As UnityPy is still in active development, breaking changes can happen.**
21
+
> These changes are usually limited to minor versions (x.y) and not to patch versions (x.y.z).
22
+
>
23
+
> <details>
24
+
> <summary>In case you don't want to actively maintain your project...</summary>
25
+
>
26
+
> Make a note of the used UnityPy version in your README or add a check in your code.
27
+
>
28
+
> ```python
29
+
>if UnityPy.__version__!='1.9.6':
30
+
>raiseImportError("Invalid UnityPy version detected. Please use version 1.9.6")
31
+
>```
32
+
>
33
+
> You can also pin the version in your `requirements.txt`or`pyproject.toml`file, which is the best practice.
34
+
>
35
+
></details>
24
36
25
-
```python
26
-
if UnityPy.__version__!='1.9.6':
27
-
raiseImportError("Invalid UnityPy version detected. Please use version 1.9.6")
28
-
```
29
37
30
38
1. [Installation](#installation)
31
39
2. [Example](#example)
@@ -208,12 +216,17 @@ The objects with a file path can be found in the `.container` dict - `{path : ob
208
216
209
217
Objects \([ObjectReader class](UnityPy/files/ObjectReader.py)\) contain the _actual_ files, e.g., textures, text files, meshes, settings, ...
210
218
211
-
To acquire the actual data of an object it has to be parsed first.
219
+
> [!IMPORTANT]
220
+
>
221
+
> To acquire the actual data of an object it has to be parsed first.
212
222
This happens via the parse functions mentioned below.
213
223
This isn't done automatically to save time as only a small part of the objects are usually of interest.
214
-
Serialized objects can be setwith raw data using `.set_raw_data(data)`or modified with`.save()` function, if supported.
215
224
216
-
For object types with``m_Name`` you can use ``.peek_name()`` to only read the name of the parsed object without parsing it completely, which is way faster.
225
+
> [!TIP]
226
+
>
227
+
> For object types with attribute `.m_Name` you can use `.peek_name()` to only read the name of the parsed object without parsing it completely, which is way faster.
228
+
229
+
Serialized objects can be setwith raw data using `.set_raw_data(data)`or modified with`.save()` function, if supported.
217
230
218
231
There are two general parsing functions, ``.parse_as_object()``and``.parse_as_dict()``.
219
232
``parse_as_dict`` parses the object data into a dict.
@@ -269,6 +282,7 @@ Now UnityPy uses [auto generated classes](UnityPy/classes/generated.py) with som
0 commit comments