Code Monkey home page Code Monkey logo

Comments (2)

nike4613 avatar nike4613 commented on June 25, 2024

Unloading is not possible.

In a .NET Framework-adjacent environment like Unity Mono, the only way to do unloading is to load what you need into a separate AppDomain and then unload that domain. Unfortunately, in order to communicate between these domains, the runtime provides remoting proxies, and those are only generated for types which are MarshalByRefObject derived. Otherwise, the object is serialized in one domain then deserialized in the other. This would have unacceptable performance overhead, but even ignoring that, Unity would not behave, and at best you'd be unable to reliably create Unity object. At worst, you'd see hard-crashes.

It would be possible to just load a new copy of a given mot into memory, but that comes with its own set of problems. It would also require that the mod properly clean itself up when it is disabled, which the vast majority of mods simply do not do.


All that being said, the two uses you specified do not need unloading; they would just require a game restart. Both of them are, in fact, already possible with the functionality that BSIPA provides. BSIPA used to even have the updater built in, and a mod manager like plugin has existed (though not been published, in large part because of my own laziness) for years in the form of https://github.com/nike4613/BSIPA-ModList-BeatSaber. I believe that ModList does actually work at present, though I have not tested it myself.

from beatsaber-ipa-reloaded.

StevenKrahforst avatar StevenKrahforst commented on June 25, 2024

Yeah makes sense

from beatsaber-ipa-reloaded.

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.