K0lb3 / UnityPy

UnityPy is python module that makes it possible to extract/unpack and edit Unity assets

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Some data structures cause crashes when trying to read the GameObject.

ablegao opened this issue · comments

commented

Code

def ExportGameObject(self, item: GameObject):
        # data01 = item.read()
        # print(json.dumps(data01,indent=4))
        try:
            data = GameObject(item).read()
            out = {
                "m_Name": data.name,
                "m_IsActive": data.m_IsActive,
            }
            return out
        except Exception as e:
            print(e)
            return {}

Error

    sitionHandling - _ISSetPhysicalKeyboardCapsLockLED Inhibit
    /opt/concourse/worker/volumes/live/c1a1a6ef-e724-4ad9-52a7-d6d68451dacb/volume/python-split_1631807121927/work/Objects/listobject.c:138: bad argument to internal function
    /opt/concourse/worker/volumes/live/c1a1a6ef-e724-4ad9-52a7-d6d68451dacb/volume/python-split_1631807121927/work/Objects/listobject.c:138: bad argument to internal function
    /opt/concourse/worker/volumes/live/c1a1a6ef-e724-4ad9-52a7-d6d68451dacb/volume/python-split_1631807121927/work/Objects/listobject.c:138: bad argument to internal function
    /opt/concourse/worker/volumes/live/c1a1a6ef-e724-4ad9-52a7-d6d68451dacb/volume/python-split_1631807121927/work/Objects/listobject.c:138: bad argument to internal function

Bug

I forget when it started, but there's an error that occurs when trying to access the GameObject structure.In the past, I would ignore some unimportant details, but now the scope of its crashes is getting larger and larger. Is there anything I can help you with, even though I don't know where to start?

To Reproduce

  • a copy of the file that causes the problem
  • following data:
    • Python 3.9.7
    • Unity Version:(2022, 1, 23, 1)
    • Mac OS 13.0 , M1