Skip to content

Commit a4b2f06

Browse files
docs: fix sample code (K0lb3#152)
1 parent 43ddded commit a4b2f06

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

‎README.md‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -227,7 +227,7 @@ __Export__
227227
```python
228228
for obj in env.objects:
229229
if obj.type.name == "Sprite":
230-
data = image.read()
230+
data = obj.read()
231231
data.image.save(path)
232232
```
233233

@@ -246,7 +246,7 @@ __Export__
246246
for obj in env.objects:
247247
if obj.type.name == "TextAsset":
248248
# export asset
249-
data = image.read()
249+
data = obj.read()
250250
with open(path, "wb") as f:
251251
f.write(bytes(data.script))
252252
# edit asset

0 commit comments

Comments
 (0)