Open wstumpfz opened 3 months ago
CC @godotengine/dotnet
I'm unable to reproduce without a C# solution. That should be stopped here:
But if there's a C# solution, it will build and include the output in the PCK. It also applies to every platform, the condition is to enable dotnet/embed_build_outputs
which Android always enables.
My apologies, I forgot I did add some C# code for testing loading pack files. I think in general though the problem remains. I'm not sure why mono needs to be included here on Android (it doesn't on Windows); I'm just packing a texture. Adding 80MB to each pack file is a dealbreaker. I tried various options with no success, but is there a way to force not including mono in a pack file when using C#?
How do you expect to run C# code without a C# runtime?
That's the cost of using a runtime-based language like C#.
If size is your main criterion, GDScript would be a much leaner solution as it's interpreted by Godot directly.
Closing as this is intended behavior.
I don't understand what you're asking here. The C# runtime is part of the executable/application. If I have an game and then later want to add new content to it (just art assets, not code) how would you propose I do this? I was under the impression pack files are used for godot's DLC workflow, is it not? And why does this behavior not happen when I export with the Windows platform on Godot? The files I'm trying to export have nothing to do with the C# runtime, in this case it's literally just a texture.
Unfortunately using GDScript is not an option for us.
I see, I had missed the fact that you're talking about additional pack files / DLCs.
In Godot, any game is a generic executable + a pack file with the game contents. When you use C#, the pack file has to include the C# runtime, it's not part of the executable itself. But then additional packs for patch/DLC content shouldn't need to include it again, that's right.
Tested versions
-Reproducible in Godot 4.2.2 stable [15073afe3], Godot 4.3RC3 [03afb92ef]
System information
Godot v4.3.rc3.mono - Windows 10.0.22621 - Vulkan (Forward+) - dedicated NVIDIA GeForce RTX 3080 Ti Laptop GPU (NVIDIA; 31.0.15.3179) - 12th Gen Intel(R) Core(TM) i9-12950HX (24 Threads)
Issue description
When using C#, any pack file created for the android platform gets mono included (increasing the size by ~80MB) even if it's just exporting a resource like a texture.
Steps to reproduce
Probably can do this in any project, but I used KennyNL's open source project (https://github.com/KenneyNL/Starter-Kit-3D-Platformer) as a test bed. Simply export a pack file with the texture "colormap.png" and notice mono gets included. Then create a pack file for the Windows platform and notice it does not include mono and is significantly smaller.
Minimal reproduction project (MRP)
https://github.com/KenneyNL/Starter-Kit-3D-Platformer