#How to figure out which AssetBundle is using these font atlases?

1 messages · Page 1 of 1 (latest)

short fractal
#

These font atlases by default doesn't being used by any addressables, so I guess these get loaded via an addressable bundle dependency.
The Profiler - Addressable Assets module usually doesn't show anything to me neither in editor nor in builds (very rarely it works, like once in 15 build startings. But last time I checked and it worked was months ago.

#

this is all I can see

#

addressables package is 1.22.3 (now I try to update it)

hardy niche
short fractal
#

unfortunately its not that easy

hardy niche
#

It is. Assets are loaded if they are referenced in a scene or by something that is loaded. That's basically it. There's no deeper layer to it.

short fractal
#

@hardy niche this is all I can see

#

Texture2D[] won't tell much even if I open that

#

also Material

#

so I can pursue only the AssetBundle

hardy niche
#

And even if you eliminate the asset bundle, it would still be loaded because of the other 2.

short fractal
#

continues infinitely

#

this is the end of it

#

Material is also similar

#

and that also ends with assetbundle

hardy niche
# short fractal

Well, you can see that it's referenced by a list of tmp font assets. You can probably find that object and see what it's referenced by.
I bet that it's something deep in the tmp internals, but ultimately, the font is used in the game somewhere.

short fractal
#

so I try to figure out which assetbundle could it be, because its not so easy to figure it out

short fractal
#

the game is set to english localization

short fractal
#

its not in Addressables groups

#

in Addressables Groups there are only normal english name group names

hardy niche
#

So your game doesn't have a Chinese localization?

short fractal
hardy niche
#

Well, then you just need to investigate where it is setup.

short fractal
#

that's what I'm trying to do since yesterday

hardy niche
#

If you can't follow a lead from one end, you try from the other end.

short fractal
#

what would be the other end?

hardy niche
#

The localization implementation in your project.

short fractal
short fractal
#
  • not to mention the components relevant to it
#

I don't know what to look for

hardy niche
#

Pff... If it was 30k lines I'd consider suggesting something

#

Figure out how different languages are handled in the project.

#

Are these assets addressable?

short fractal
hardy niche
#

But I assume they reference the atlas?

short fractal
#

probably indirectly yes

hardy niche
#

In the editor

short fractal
#

and in there they are not there

hardy niche
#

Well, find what references these assets in the editor.

short fractal
#

@hardy niche it seems these fonts are in the Built-in Data (in the Addressables Groups window), and chatgpt says these are loaded during the whole game session.

#

is it true?

hardy niche
#

Where do you see that they are in this group?

short fractal
#

well, these were not included in here before

#

but these were in the Resources folder for months

steady shadow
#

Lets remember that Resources stuff cannot be put in addressable groups
If dependencies then they would be duplicated and is a good reason to move all font shit out of resources if you use addressables only.

short fractal
#

I just don't understand why its added now and it was not added 1 week ago

#

I made a snapshot on 22th sept

#

and these fonts were not there

#

in memory

steady shadow
#

Build addressables in editor to get a build report to see why its there

#

(build report is also needed for the addressables profiler to work)

short fractal
#

okay, now I can see where are these included

#

okay, now I can see where they are referenced

steady shadow
#

good lord thats a big bundle

short fractal
#

unfortunately the prefabs themselves are huge as well

#

so it won't be easy to find which gameobject could refer to these

short fractal
#

okay, I have zero idea what happened...

#
  1. I identified the common point of these prefabs referring to the localization atlases
#

that was a prefab as well

#
  1. only one gameobject on this common prefab had TextMeshPro on it, so I thought I would remove it.
#
  1. when I removed it, then it solved the issue.(I rebuilt the addressables) I don't remember what happened, when I reverted it.
#
  1. then I tried to identify what parts in the common prefab's code refers to language localizations, and I just commented those out, because it would be weird if these would cause the issue (these codes are used in many other places as well)
#
  1. then I tried to shelved these one by one if I can identify some code change which could trigger this dependency
#

and then I reverted everything related to this

#

I rebuilt the addressables

#

and still the localization fonts are no longer pulled in as dependency...

#

wtf

#

ok, I restarted unity, rebuilt addressables and now they appeared again

steady shadow
#

be warned that prefab variants depend on their parent prefab so that can introduce dependencies

short fractal
#

its not a prefab variant

#

its just a simple prefab

steady shadow
#

gotcha but you think it should not have this dependency on this tmp font?

short fractal
#

we already saw the dependencies

#

just the dependencies make no sense

#

all the 18 prefabs referring to the localization font atlases have 1 common part:

steady shadow
#

I have seen materials have dependencies to textures it no longer uses, if you use debug inspector mode you can find em

short fractal
#

this one

#

LTSoul-Medium SDF has nothing to do with the other fonts

#

no elements in Fallback list, nothing

steady shadow
#

check that font material with debug inspector mode just incase then

short fractal
#

ah never mind

steady shadow
#

checked saved properties? I dont remember where but I certainly had this issue before

short fractal
#

I found it

#

@steady shadow

#

but I clear these up in runtime, so no idea still

steady shadow
#

at runtime? but does the dep exist at bundle build time?

#

if so then thats the answer. I usually just use the main tmp settings fallback font list

short fractal
#

yeah, I see what is the issue now

#

I just don't understand why it wasn't part of the addressables previously

short fractal
#

but I understand now

#

there's a prefab, which was recently added

#

which is indeed inside addressable bundles

#

and that contains reference to the font

steady shadow
#

someone telling you no sucks but doesnt change the real solution :/

short fractal
#

which has indeed has those localization atlases

steady shadow
#

having more groups or changing the bundle mode for a group can help there

short fractal
#

yeah

#

so I understand why it wasn't an issue before

#

and why it is now

#

@steady shadow @hardy niche thanks a lot for the help. I think I will load the font asset at runtime in this exact prefab, and that will solve the issue.

#

(only for NDA platform)

steady shadow
#

cool hope its okay now 👍

short fractal
#

it was indeed solved, but these fonts can be loaded by something else as well... not just via from addressables dependencies