Skip to content

Commit cd42630

Browse files
committed
Add some extra debug info in case of error
1 parent 68f8bdd commit cd42630

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

scripts/EMIPGenerator.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,9 @@ def pngToTexture2D(self, pngData, unityVersion):
6464

6565
def loadTexture2DInfo(self, assets, bundle):
6666
self.shouldDecode = True
67+
print(f'Writing {self.file} with id {self.id}')
68+
if self.id not in assets.objects:
69+
raise Exception(f"ERROR: When loading Texture2D info for file {self.file} with id {self.id}, the id was not found. Are you sure the ID {self.id} is correct/exists in the sharedassets?")
6770
obj = assets.objects[self.id]
6871
data = bundle[obj.data_offset:(obj.data_offset + obj.size)]
6972
length = int.from_bytes(data[0:4], byteorder='little')
@@ -163,6 +166,8 @@ def generateHeader(numEdits):
163166
header += numEdits.to_bytes(4, byteorder='little') # Number of file changes
164167
return header
165168

169+
print(f"Running EMPIGenerator in directory [{sys.argv[2]}]")
170+
166171
edits = []
167172

168173
for file in os.listdir(sys.argv[2]):

0 commit comments

Comments
 (0)