Comments (2)
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.
Yeah makes sense
from beatsaber-ipa-reloaded.
Related Issues (20)
- System.NullReferenceException on game start in System.Guid.NewGuid() HOT 4
- Getting an error message with no text after loading IPA HOT 2
- Autoupdater makes mods downgrade in specific cases
- Launch game error : System.NullReferenceException HOT 3
- NullReferenceException on startup with a fresh install HOT 6
- Newtonsoft can't find System.Numerics
- Game crashes when launching from executable without SteamVR HOT 1
- Game crashes when launching from executable without SteamVR HOT 4
- Disabled mods being flagged as ignored
- Unable to find package `Hive.Versioning.Standalone`. HOT 7
- Doorstop Fatal HOT 1
- Black screen when trying to load into any song [v1.20] HOT 10
- Licence HOT 2
- Rebuild GameAssemblies on game version change HOT 1
- Nullable DateTime converter clears data in json config file HOT 2
- Install failed - no UserData folder created [Hearthstone] HOT 1
- If there are too many mods, the error loops endlessly
- --debug launch arg results in hard crash on Unity 2021.3.16f1 HOT 3
- quest 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from beatsaber-ipa-reloaded.