Skip to content

LostSmile level0 some of MonoBehaviour can not be exported #322

@YuriSizuku

Description

@YuriSizuku

Code

import os
import UnityPy
from UnityPy.helpers.TypeTreeGenerator import TypeTreeGenerator

GAME_ROOT_DIR: str = os.path.dirname(__file__)
GAME_UNITY_VERSION: str = "2018.4.15f1"

env = UnityPy.load(os.path.join(GAME_ROOT_DIR, "LostSmile_Data/level0"))
generator = TypeTreeGenerator(GAME_UNITY_VERSION)
generator.load_local_game(GAME_ROOT_DIR)
env.typetree_generator = generator

for obj in env.objects:
    if obj.type.name == "MonoBehaviour":
        try:
            tree = obj.read_typetree()
            print(f"success {tree['m_Name']}, pathid{obj.path_id}")
        except Exception as e:
            print(f"fail {e}, pathid{obj.path_id}")

Bug
It seems that some of monobehaviour read_typetree don't have correct size.

success , pathid840
success , pathid841
success , pathid842
success , pathid843
success , pathid844
success , pathid845
fail Expected to read 76 bytes, but only read 32 bytes, pathid846
success , pathid847
fail Expected to read 140 bytes, but only read 32 bytes, pathid848
success , pathid849
fail Expected to read 112 bytes, but only read 32 bytes, pathid850
fail Expected to read 60 bytes, but only read 32 bytes, pathid851
fail Expected to read 160 bytes, but only read 32 bytes, pathid852
success , pathid853
fail Expected to read 376 bytes, but only read 32 bytes, pathid854
fail Expected to read 112 bytes, but only read 32 bytes, pathid855

To Reproduce

LostSmile_Data.tar.gz

  • following data:
    • Python version 3.8
    • UnityPy version 1.22.4
    • Unity version 2018.4.15f1

@isHarryh Thank you very much for fixing previous texture problem. Do you have any ideas about this ?

Here's the value by assetstudiomod

Image

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions