-
-
Notifications
You must be signed in to change notification settings - Fork 111
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
Question: How to get textual representation of MonoBehaviour type? #13
Comments
I'm not sure how UABE links to the dlls and I never bothered with it, since most modern games use il2cpp. Usually, MonoBehaviour objects contain a custom type tree that is used as a variable input for specific functions. |
Yay, found it. It turns out UABE shows Here is the code for def export_obj(obj, fpath: str, asset: str) -> list:
format = obj.type
if format not in TYPES: return []
data = obj.read()
name = data.name if (data.name is not None and data.name != '') else "unnamed asset"
fname, extension = os.path.splitext(name)
name = "%s-%s-%d" % (fname, asset, obj.path_id)
fp = os.path.join(fpath, name) elif format == 'MonoBehaviour':
extension = ".dat"
script = data.script.read()
if not script: return [obj.path_id]
fp = os.path.join(fpath, script.namespace, script.class_name, name)
os.makedirs(os.path.dirname(fp), exist_ok=True)
with open(f"{fp}{extension}", "wb") as f: f.write(data.get_raw_data())
return [obj.path_id] |
For example UABE can show the type like this:
0xFFFFFFFF (MonoBehaviour : UnityEngine.UI.Image (UnityEngine.UI.dll))
.Is there a way to reproduce this with UnityPy?
I don't really know specifics of the storage so I couldn't find where this information is...
The text was updated successfully, but these errors were encountered: