Open CatsArmy opened 8 months ago
i'm not sure to understand, you can choose the extension when you build an unity bundle, it's just locked to .lem when you make a bundle with the SDK if you build it by your own ways you can change the extension
I know but it is hard coded that the output type of the assetbundle is . lem
When ever I was building it some times it would revert back to . lem in unity. Also it allways had the same output type: {assetbundlename}.lem
I am suggesting that this:({assetbundlename}.{assetbundlextension}) would be the behavior for when saving the asset bundle to the selected path.
My reasoning is simple: LE core does the following on startup/awake:
Call function: LoadAllAssetBundles(params)
This function searches your r2modman/thunderstorm profile like so:
For each mod in the bepinex\plugins It searches for *.lem and then loads that assetbundle.
This behavior causes an incompatibly in space sun shine that made it fail to load the new sun.
I didn't want to just rename the file my self as I don't know how asset bundles fully work so I tried resx which sometimes crashed the game cus out of memory so I came back to unity and tried changing the assetbundle extension which was really painfully by the way you can't do it when selecting all for some reason and it randomly just reverted back to . Lem or just didn't let me change it unless I changed it to none and then to lcm
And after doing that painful change I went to build the assetbundle. And so I did and it build it as a . Lem and the . Lcm one that was created didn't have anything that I told it to via the .lcm ext
And so I went snooping in dnspy into this project after you built it (assets\plugins)
And there under the - tab I found 2 files that were the ones who built the assetbundle and so I searched for lem and found where you where saving it and sure enough it was hard coded to save as a .lem file
i really barely understand..
use this tool to build easily an asset bundle without code https://github.com/Unity-Technologies/AssetBundles-Browser and give it another extension than LEM
before to build it, on each asset you want in your bundle, set another extension than LEM in the bottom of the inspector
LE only load .lem files to don't conflict with other mods that use bundles and i don't plan to change the hardcode in the SDK because peoples must always make a .lem bundle from using the SDK, i don't want to confuse them more with a tool already complicated
P.S. if it revert back to .LEM it's because you have the SDK installed and your asset is in a mods/xxx folder don't use the SDK if you don't need it, just remove it, use a clean unity project or another folder than "mods"
I am referring to the image above I had to use dnspy to edit the il code of the string to change it I'm trying to suggest this uses a input box with that as the default
Still, the .lem is a convention because some other mods loads their own extension Lcapi was loading every bundle, I had to ask them to add an exception for lem files There's no goal on leaving peoples change their extension I gave you a tool to make your own bundles without the SDK
add option to choose the file extension in the AssetBundle builder
my reasoning for this is simple LE core does something annoying.,.. it allways loads all asset bundles that have the .lem as their extension. that may not seem like an issue untill i realized that its the reason it was making space sun shine not load the sun prefab and then i tried using resx which sometimes crashed my game due to lack of available memory so i chose to switch back to just leaving the assetbundle in there and so now i am stuck unable to fix this as i cannot change the extension to .lcm (Lethal Cats army Mod - or something like that)