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.
#How to figure out which AssetBundle is using these font atlases?
1 messages · Page 1 of 1 (latest)
Loaded since they're referenced by stuff. You can see in the referenced by tab.
no, I can't
unfortunately its not that easy
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.
@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
What does it tell? And what does the material tell?
And even if you eliminate the asset bundle, it would still be loaded because of the other 2.
continues infinitely
this is the end of it
Material is also similar
and that also ends with assetbundle
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.
so I try to figure out which assetbundle could it be, because its not so easy to figure it out
yeah, but where 🙂 because this font atlas is full of chinese characters. And nothing (literally) showing chinese characters in the UI in the screens I made snapshot of
the game is set to english localization
Can't you search it by the ID?
search it where?
its not in Addressables groups
in Addressables Groups there are only normal english name group names
So your game doesn't have a Chinese localization?
it has, but its not being used anywhere in the game currently (in the moment the snapshot was made)
Well, then you just need to investigate where it is setup.
that's what I'm trying to do since yesterday
If you can't follow a lead from one end, you try from the other end.
what would be the other end?
The localization implementation in your project.
that will be fun
any better tips? its an 1000 line long class
- not to mention the components relevant to it
I don't know what to look for
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?
Assuming that asset bundle is from an addressable, you could search that asset bundle name in the addressable build report:
https://docs.unity3d.com/Packages/com.unity.addressables@2.7/manual/BuildLayoutReport.html
no, they are not
But I assume they reference the atlas?
none of the groups reference the atlases directly
probably indirectly yes
I meant the Addressables Groups window
and in there they are not there
Well, find what references these assets in the editor.
@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?
Where do you see that they are in this group?
Here's what the docs say, so chat gpt is partially right(they would get loaded if they are in Resources folder):
Built In Data: contains assets in any Project Resource folders and any Scenes included in the Build Settings list. (None of these assets can be Addressable unless removed from Resources or the Scene list.)
https://docs.unity3d.com/Packages/com.unity.addressables@1.20/manual/Groups.html
well, these were not included in here before
but these were in the Resources folder for months
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.
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
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)
okay, now I can see where are these included
okay, now I can see where they are referenced
good lord thats a big bundle
unfortunately the prefabs themselves are huge as well
so it won't be easy to find which gameobject could refer to these
okay, I have zero idea what happened...
- I identified the common point of these prefabs referring to the localization atlases
that was a prefab as well
- only one gameobject on this common prefab had TextMeshPro on it, so I thought I would remove it.
- when I removed it, then it solved the issue.(I rebuilt the addressables) I don't remember what happened, when I reverted it.
- 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)
- 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
be warned that prefab variants depend on their parent prefab so that can introduce dependencies
I know
its not a prefab variant
its just a simple prefab
gotcha but you think it should not have this dependency on this tmp font?
You can use asset database to get dependencies for an asset or use a package that can show them to you in editor
https://docs.unity3d.com/6000.2/Documentation/ScriptReference/AssetDatabase.GetDependencies.html
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:
I have seen materials have dependencies to textures it no longer uses, if you use debug inspector mode you can find em
this one
LTSoul-Medium SDF has nothing to do with the other fonts
no elements in Fallback list, nothing
check that font material with debug inspector mode just incase then
what to check in there?
ah never mind
checked saved properties? I dont remember where but I certainly had this issue before
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
yeah
yeah, I see what is the issue now
I just don't understand why it wasn't part of the addressables previously
I'm not allowed to clear up that font fallback list in build time though
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
someone telling you no sucks but doesnt change the real solution :/
which has indeed has those localization atlases
having more groups or changing the bundle mode for a group can help there
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)
cool hope its okay now 👍
it was indeed solved, but these fonts can be loaded by something else as well... not just via from addressables dependencies