IllusionMods / BepisPlugins

A collection of essential BepInEx plugins for games made by Illusion.
GNU General Public License v3.0
383 stars 82 forks source link

suggestion: sideloader support for mods without AssetBundles, or user-created ABs #25

Closed enkephalin07 closed 6 years ago

enkephalin07 commented 6 years ago

If Sideloader can read the necessary files from csv, why do those files need to be in .unity3d files? Couldn't they be organized in any arbitrary directory structure? And couldn't a modder who works in Unity Editor produce their own .unity3d ABs for convenience? This way you could add the assembly.dll to the project's asset library and make use of any classes defined in it.

bbepis commented 6 years ago

If Sideloader can read the necessary files from csv, why do those files need to be in .unity3d files? Couldn't they be organized in any arbitrary directory structure? They don't need to be in .unity3d files. You can still use the .png textures directly from the zip, you just need to match the directory structure/path. You can check my .zip example here where I do this, from the wiki: https://my.mixtape.moe/ionkgy.zip

As for supporting other asset types rather than just Texture2D, it depends on the type. There are some types that I cannot both store outside of a unity3d file, and can also deserialize to a type. For instance, there is no way for me to create a TextAsset from scratch and insert my own data with the UnityEngine API. (Although I believe this is possible now to an extent with BepInEx 4.0 assembly patching features)

And couldn't a modder who works in Unity Editor produce their own .unity3d ABs for convenience? This way you could add the assembly.dll to the project's asset library and make use of any classes defined in it. It is possible, as far as I know you need to create a script in Unity Editor that calls this method, which exports a .unity3d file. I'm not sure how to do it myself as I have never done it, but I have been told by multiple modders that this is how it's done. https://docs.unity3d.com/560/Documentation/ScriptReference/BuildPipeline.BuildAssetBundles.html

enkephalin07 commented 6 years ago

@bbepis How about support for partial assets? There's some now, I've experimented with it a bit to find out its extents, but when an asset loads, AB manager looks for referenced files in that AB file and ignores any other files that contain those. Sideloader appears to do the same, but if modders could package only modded (files eg: only materials and textures for models) there would be broader compatibility and file sizes could be reduced by 2000%. That's not an exaggeration; from the examples I've seen it's probably an underestimate.

ManlyMarco commented 6 years ago

Is it done? Bepis Today at 10:09 AM ye