I have a modding system, I programmatically create an assetbundle, and a DLL(s) based on the assets/scripts in a certain scene. This works fine for Windows, but I can't get the DLL to work for Android (builds the bundle fine though) - code below
private void DoScriptOnlyBuild(string destination, IEnumerable<string> managedAssemblyNames, string bundleName, bool ecsOrBurst)
{
var bpo = new BuildPlayerOptions()
{
locationPathName = Path.Combine(destination, "__build", "plugin"),
target = _environmentType == EnvironmentType.Windows ? BuildTarget.StandaloneWindows64 : BuildTarget.Android,
options = ecsOrBurst ? BuildOptions.DetailedBuildReport : BuildOptions.DetailedBuildReport,
subtarget = (int)MobileTextureSubtarget.Generic, //Tried this too, didn't work
};
Debug.Log($"Prepare to build..");
//This should create a bunch of DLLs, we then cherry pick the ones we need for the mod using the managedAssemblyNames list
BuildReport report = BuildPipeline.BuildPlayer(bpo); //Doesn't generate DLL!
While, on Windows, this creates a DLL perfectly fine, this doesn't seem to happen when targeting android. There are no logs in the console (except for a warning about not being able to parse XML with no further info, but people on the forums say they get this even on healthy builds) The build report tells me nothing useful.
I'm also able to build the entire project to android just fine via the standard unity build button, this of course creates an APK though rather than a bundle/dll
Any ideas?
Cheers,
Fred