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
importosfromUnityPyimportAssetsManagerdefunpack_all_assets(source_folder : str):
# iterate over all files in source folderforroot, dirs, filesinos.walk(source_folder):
forfile_nameinfiles:
# generate file_pathfile_path=os.path.join(root, file_name)
# load that file via AssetsManageram=AssetsManager(file_path)
# iterate over all assets and named objectsforassetinam.assets.values():
forobjinasset.objects.values():
# if obj.type == "GameObject" and obj.read().name.startswith("illust"):# data = obj.read()# print(data.name, data.read_type_tree())# only process specific object types#if obj.type == "MonoBehaviour" and obj.path_id == 413749536710485738:# parse the object data# data = obj.read()#print(obj.path_id, data.name, data.type_tree)ifobj.type=="Material":
print(obj.path_id)
data=obj.read()
unpack_all_assets('./')
I'm trying to load Materials in the file using UnityPy, but all the Materials cannot be correctly loaded.(UnityPack can load them)
Unity Asset File:Download Here
My Code:
Traceback:
The text was updated successfully, but these errors were encountered: