My game uses
AssetBundles, and quite often each of those bundles use
TextMeshPro. The project is at a stage where it would be unwise to change to
Anyway, I noticed that when a bundle has
TextMeshPro involved, it easily adds roughly 2mb to the bundle - I assume it's a copy of all the dependencies to make it work.
Ideally all bundles should simply point to one copy which is guaranteed to always be present in the game, which I think
Addressables sort of does, but as mentioned we cannot use it for this project for various reasons.
One way is to create/add the
TextMeshPro components at runtime (e.g. have some kind of "placeholder/dummy" component that, upon
Awake() will add
TextMeshPro with various preset attributes).
That would work fine, and I'm willing to do that - but perhaps there are less tedious alternatives (other than
Addressables) that I haven't thought of.
The goal is to be able to reduce the disk space required for each bundle just because it is using