Good afternoon everyone,
I have a problem :
Unity 2019.2.0f1, TextMesh Pro 2.0.1
Each time I open the Unity Editod TextMesh Pro always reimport the fonts (setup kerning values)
Please, Help! It takes almost ten minutes just to start the editor now!
Need to test - but it seems if you make a dynamic font both in TextMeshProAsset and the font itself - the problem seems to be gone⦠Please, need your advice!
The above message āHold onā¦ā and importing of kerning values comes from the Unity Font Importer and not TextMesh Pro.
I am not sure why this message would keep re-appearing. What were the settings of that particular font in the Font Importer?
I figured it out - I switched to new Unity 2019.2 with old package (simply deleted library and fixed the version in project version) - you need to download latest TextMesh Pro - and reimport the essential tools!
I have this problem too, in 2019.2.17f1.
Nearly every time Unity rebuilds in-editor (which is quite often, as this happens every time I change a script!), it says āHold onā¦ā and āSetting up kerning values for font āArialāā, then"Hold onā¦" and āSetting up kerning values for font āLiberation Sansāā (I typed the messages in full to help people find this post from Google). This process takes approximately 2 minutes for me, but happens most times I change any script or do anything to cause Unity to rebuild.
I agree with Stephan_B and donāt think this has anything to do with TextMesh Pro, as the fonts that are causing these messages are a different set of fonts than what I use in TMP. The dialogue also matches the other Unity built-in dialogue boxes, such as āImporting small assets.ā rather than those of TextMesh Pro.
I can confirm that deleting Library and letting Unity regenerate it seems to have fixed this problem. I will reply again if the issue comes back up. I hope my input helps anyone who might have stumbled onto this post with the same issue.
Thank you for sharing this information.
Iāll ask around to see what might have changed on the import side that would cause this new behavior.
No problem, and thank you for looking into it
The issue was gone for the rest of the day yesterday after I let Unity regenerate Library, but it came back today. Let me know if there is anything I can do to help.
I need to figure out a way to reproduce the behavior. Something is causing this re-import on the Unity side but not sure what.
Can you submit a bug report and include a project that will enable me to reproduce the behavior?
Ok. My current laptop is out of disk space so I canāt dupe my project for a repro project until my new one gets here (in a few days), but then if all goes well I will minimize my project and submit it in a bug report as a repro project within a few days. Iāll reply here when I do or if I run into trouble.
My new computer got here today but I havenāt made the repro project yet. However, I did find out some more information which I think could be helpful.
First, the reimport dialogues begin with an āImporting small assets.ā dialog that flashes quickly.
Second, there are at least two more fonts that are being reimported: Bebas and Open Sans. Their dialogue boxes flash by really quickly, especially Bebas. I had to screen capture and frame-by-frame in order to see what font it was. The order is Bebas, Arial, Open Sans, and then Liberation Sans.
Third, sometimes the reimport happens just by leaving play mode with no script changes.
And finally and most significantly, if I try to save while the reimport is still happening, I get a Unity-internal exception with a stack trace. I will attach screenshots of the exception and the code line that throws it. It is in the LWRP code in a static method called ReimportAllMaterials, and I am indeed using LWRP (and the experimental 2D renderer), so take that as you will. I hope this helps and I still plan to make a repro project as soon as I get a chance.
Good find and very interesting
I would strongly suggest submitting a bug report as this is something the Graphics team (those handling SRP) should take a look at.
Hello,
Any update regarding this issue?
I tried to upgrade my Unity version, through hub, but I could not, due to this issue: Cannot download editor from unity hub
Hi,
I want to submit a bug report, but my project is huge (3 GB), is there any other way?
Thatās the reason why I havenāt submitted a bug report yet either. However, I may have just solved this. Here is the relevant Unity-internal code:
class MaterialReimporter : Editor
{
const string Key = "LWRP-material-upgrader";
[InitializeOnLoadMethod]
static void ReimportAllMaterials()
{
//Check to see if the upgrader has been run for this project/LWRP version
PackageManager.PackageInfo lwrpInfo = PackageManager.PackageInfo.FindForAssembly(Assembly.GetAssembly(typeof(LightweightRenderPipeline)));
var lwrpVersion = lwrpInfo.version;
var curUpgradeVersion = PlayerPrefs.GetString(Key);
if (curUpgradeVersion != lwrpVersion)
{
string[] guids = AssetDatabase.FindAssets("t:material", null);
foreach (var asset in guids)
{
var path = AssetDatabase.GUIDToAssetPath(asset);
AssetDatabase.ImportAsset(path);
}
PlayerPrefs.SetString(Key, lwrpVersion);
}
}
}
Note that it checks PlayerPrefs to see if it needs to update. In my code, I am clearing PlayerPrefs every time the game starts in the editor with PlayerPrefs.DeleteAll(); therefore, it always thinks it is out of date.
The spam filter is preventing me from editing my previous message, saying my edit is āspam likeā. Please read āstarts in the editorā as āruns while in Unity Editorā.
Me too, I think thatās the reasonā¦If I deactivate PlayerPrefs.DeleteAll() in the editor, it seems no more annoying reimporting heppening.
Thank you for the find
No problem, Iām glad that fixed it for you too. I also havenāt had the annoying reimport since removing PlayerPrefs.DeleteAll() from my startup code either.
Stephan_B, should I still file a bug report? Itās not exactly intuitive or expected that LWRP is using PlayerPrefs internally, but Iām not sure this counts as a bug anymore. Now that I know what was causing this to happen, it should be much easier to make a repro project from scratch instead of having to strip down my game.
I would still suggest submitting a bug report with repro project if possible but for certain pointing to this thread for the QA folks to review.
Make sure to identify the issue as being related to LWRP and the use of PlayerPrefs.
I have submitted bug report 1213871 for this issue and attached a working minimal bug reproduction project.
https://fogbugz.unity3d.com/default.asp?1213871_vn8kuuknleqesct9
Thank you