Giter VIP home page Giter VIP logo

Comments (1)

K0lb3 avatar K0lb3 commented on July 29, 2024

This code can't work and doesn't do what you're intended to do.

You pass
src = io.BytesIO(b"Streamable")
to UnityPy.
The object isn't an Unity asset, so UnityPy will just store it as reader.

Since UnityPy got no Unity asset as input, it won't be able to find any objects,
so your loop below won't do anything, in fact, it will just be skipt as env.objects will be empty.

    for obj in env.objects:
        if obj.type in ["Texture2D"]:
            # export texture
            data = obj.read()
            if data.name == a:
                # edit texture
                with Image.open(a+".png") as pil_img:
                    data.image = pil_img
                    data.save()
                    ```
 
 Since you don't change any asset, I'm wondering why you even try to repack/save the "asset".
 Anyway, since you're loading no Unity asset, the save command can't be applied to the only loaded file either.
 

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.