Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The container attribute of the file cannot be read correctly #236

Open
nijinekoyo opened this issue May 26, 2024 · 0 comments
Open

The container attribute of the file cannot be read correctly #236

nijinekoyo opened this issue May 26, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@nijinekoyo
Copy link

Code

objectType = object.type.name
objectContainer = object.container
if objectType not in exportTypes:
    return

try:
    fileData = object.read()
except Exception as e:
    print(f"Error: {e}")
    return

if hasattr(fileData, "name") == False or fileData.name is None or fileData.name == "":
    return

fileName = fileData.name

if objectType == 'Mesh':
    print(object.container) # print None

Bug
The same file can get container information in AssetStudio, but it cannot be obtained normally with UnityPy. Print will get None
image

To Reproduce

  • a copy of the file that causes the problem
    File: mdl_chr_fktn-casl-0000_body.zip
    Unity Version: 2022.3.21f1
  • following data:
    • Python version: 3.10.11
    • UnityPy version: 1.10.13
@nijinekoyo nijinekoyo added the bug Something isn't working label May 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant