Git Product home page Git Product logo

Comments (3)

K0lb3 avatar K0lb3 commented on May 20, 2024

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.
The use is quite diverse, e.g. as instruction set for how to assemble and transform multiple images for a UI, as a list for all game asset files, .....

from unitypy.

K0lb3 avatar K0lb3 commented on May 20, 2024

image

The reference to a function of a dll isn't necessary either and if it exists, it's saved as a string.

from unitypy.

UserUnknownFactor avatar UserUnknownFactor commented on May 20, 2024

Yay, found it. It turns out UABE shows namespace and assembly_name of the underlying MonoScript object there. That got me confused. And the MonoScript always have them so they can be used like that. It's nice to know that MonoBehaviours can contain TypeName though.

Here is the code for AssetBatchConverter.py I used to extract MonoBehaviours into separate folders by their corresponding namespace:

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]

from unitypy.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.