Search Unity

Question Why is Unity pulling Unused fonts into asset bundle?

Discussion in 'Asset Bundles' started by Gunner22, May 15, 2023.

  1. Gunner22

    Gunner22

    Joined:
    Jan 15, 2020
    Posts:
    56
    When I inspect my asset bundle it seams Unity pulls all types of one font as dependency even if that is not used. I am using Text Mesh Pro so idk if this has something to do with that or not but it doesn't look I can get rid of them. On attached image you can see all of the fonts in the bundle and of all these I maybe use 3 or 4.
    upload_2023-5-15_13-56-18.png
     
  2. AndrewSkow

    AndrewSkow

    Unity Technologies

    Joined:
    Nov 17, 2020
    Posts:
    91
    Hi Gunner22, I would expect this is related to TextMesh Pro. I found this forum post that describes related issues, e.g. that TextMesh Pro assumes that it is in the Resources folder and doesn't work that well with AssetBundles.

    AssetBundle builds will include content based on the references it finds, and tries to avoid any special cases for different features and packages, so it is somewhat dependent on those features to structure data well for efficient building.
     
    DaveA_VR likes this.
  3. Gunner22

    Gunner22

    Joined:
    Jan 15, 2020
    Posts:
    56
    Yeah it has to do with the TextMesh Pro. I mean TextMesh Pro is the default for most of Unity projects and I imagine a lot of them use Asset Bundle and Addressables are there any plans on fixing this?