Unity WebGL Build size increased with version upgrade (2018.4) - unity3d

My Unity project builds to about 16MB for WebGL. I have a build script that enforces settings such as build size, compression, included scenes (we use asset bundling), and more.
When switching from 2018.2 to 2018.4 my build size went from 16MB to 40MB. I have double checked all the build settings, scene inclusion and asset bundle settings. Everything is the same.
I cannot find any reason why it would be so large, or any related issues on the forums / questions. Any ideas of where to start? Happy to provide settings in full if that would help.
I tried on both a windows and mac with same results.

The issue was the introduction of nested prefabs between 2018.2 and 2018.4. I had a build script that removed my theme song audio files from a prefab on my first scene, so that it could be loaded from an asset bundle on webgl. On 2018.2 the prefab auto saved and this was fine, the audio files were taken out of the build so it only existed in the asset bundle, on 2018.4 however you have to manually save the prefab, so the large audio files existed in the build as well as my asset bundle.
note: for those curious, i dont use asset bundles for iOS or Android so thats why i leave the audio files in the first scene. I have a custom webgl build script

Related

IL2CPP interfering with gravity (RigidBody)

I have created an app in unity to load asset bundles. When I load asset bundles, game objects with rigid body components and isGravity is off are working fine. But when I enable isGravity, gameo bjects start to pass through each others. This problem is Only happening in IL2CPP build but every thing is working fine in Mono build settings.
My unity version is 2019.4.
Thank you in Advance.
If it works in the Mono version, it is probably a Unity bug.
If you can, update Unity to a newer version, and see if the problem goes away.
While searching some topics, I found out that Unity has a setting called "Strip Engine Code" that is enabled in IL2CPP. This setting is enabled by default in IL2CPP to remove unwanted or not useful codes. As a result, the scripts used in Asset bundles are not included while building IL2CPP Android apps.

How to build uinty project to webGL for browsing on iPhone?

I built unity project to WebGL.
But it working on browser very slow and can't check on iPhone.
How can we do that?
I think reason of slow loading speed is that project include some videos.
If I delete theses files speed can be fast?
I did but still slow.
Please help me
Built project structure
Videos

Best way to dynamically load Assets in Unity WebGL Builds from external Source during Runtime

Ive got a Unity WebGL Build with alot of Assets (1k+) that keep increasing. Everytime a new Asset gets added the whole Thing has to be built again which takes a lot of Time.
I only need a small Amount of the Assets during Runtime but i cant know which Assets exactly (The User can decide which Assets to actually use and see during Runtime).
Ive heard about Asset Bundles but i dont quite understand them yet. Is it possible to have some Sort of external Server running on its own with all the Assets there and then have the WebGL Build load the specific Assets it needs during Runtime from that Server?
You can use Addressable Asset System with remote catalog for dynamic asset delivery using any CDN. Every time you run your game Addressable Asset System will download assets dynamically & asynchronously. This feature is successor of old asset bundle system.

Unity - Uploading and downloading files in a game using a GUI

Is it possible in Unity to upload and download files while in a game? I want to make a minecraft-style building game and allow the user to import and use their own models (.obj files, etc), while in the game. I've been using Playfab for a backend and Photon for online cabilities, but as far as I can tell it will only work with image files (in Playfab). Is there a way to accomplish this and what would I need to use?
Yes, the way to go is to use Asset Bundles
Asset Bundles are platform specific assets that you create in Unity, but that you don't put in your build. Instead you can download them later, just as you want.
The process is a bit long, but not that difficult. The unity manual is actually really good and it should be easy to follow. Here is the link:
Asset Bundles documentation

Unity3d android apk file becomes huge without any scene

My game size became huge suddenly. For determining the problem I deleted all the scenes form project window and let the Unity build the empty apk. But the apk becomes 87mb without any scene! I surprised what did happened or what Unity loading while there is no scene at all!
from what I've experienced unity has a tendency to package any imports into your final build. so any libraries or packages you told it to import when you created get packaged whether you use the assets in them or not. i've only used unity to build for the pc platform but this is what i've seen when doing benchmarks against empty builds. so be very careful what you import and only import exactly what you need.