Textmesh pro resources missing error (even tough I imported them)
Asked Answered
C

2

0

I’m using Textmesh Pro version 3.2.0-pre.5, and I have already imported the essential resources and examples and extras. The reason I’m using a pre release is that the official release was somehow preventing me from creating a build, and I read in a thread that updating to the pre-release fixed it (wich it did). Strangely, just yesterday the code worked correctly, and I shouldn’t have changed anything related to Textmesh Pro so I have no idea why I’m suddenly getting these errors. I even tried deleting and reinstalling TMP, but no luck.

Can anyone help me?

NullReferenceException: Object reference not set to an instance of an object
TMPro.TMP_Settings.get_defaultStyleSheet () (at ./Library/PackageCache/[email protected]/Scripts/Runtime/TMP_Settings.cs:366)
TMPro.TMP_Text.GetStyle (System.Int32 hashCode) (at ./Library/PackageCache/[email protected]/Scripts/Runtime/TMP_Text.cs:2822)
TMPro.TMP_Text.get_textStyle () (at ./Library/PackageCache/[email protected]/Scripts/Runtime/TMP_Text.cs:367)
TMPro.TMP_Text.PopulateTextProcessingArray () (at ./Library/PackageCache/[email protected]/Scripts/Runtime/TMP_Text.cs:2159)
TMPro.TMP_Text.SetText (System.String sourceText) (at ./Library/PackageCache/[email protected]/Scripts/Runtime/TMP_Text.cs:2407)
inventoryUI.RefreshInventory () (at Assets/Scripts/InventorySystem/inventoryUI.cs:67)
inventoryUI.SetInventory (Inventory i, System.Int32 EquippedItem) (at Assets/Scripts/InventorySystem/inventoryUI.cs:26)
PlayerInventory.Update () (at Assets/Scripts/InventorySystem/PlayerInventory.cs:63)
TMPro.TMP_Text.get_textStyle () (at ./Library/PackageCache/[email protected]/Scripts/Runtime/TMP_Text.cs:367)
TMPro.TMP_Text.PopulateTextProcessingArray () (at ./Library/PackageCache/[email protected]/Scripts/Runtime/TMP_Text.cs:2159)
TMPro.TMP_Text.SetText (System.String sourceText) (at ./Library/PackageCache/[email protected]/Scripts/Runtime/TMP_Text.cs:2407)
inventoryUI.RefreshInventory () (at Assets/Scripts/InventorySystem/inventoryUI.cs:67)
inventoryUI.SetInventory (Inventory i, System.Int32 EquippedItem) (at Assets/Scripts/InventorySystem/inventoryUI.cs:26)
PlayerInventory.OnTriggerEnter2D (UnityEngine.Collider2D col) (at Assets/Scripts/InventorySystem/PlayerInventory.cs:33)
TextMesh Pro Essential Resources are missing, which are crucial for proper functionality. To import them, go to 'Window > Text Mesh Pro > Import TMP Essential Resources' in the menu.
UnityEngine.Debug:LogError (object)
TMPro.TMP_PackageResourceImporter:OnDestroy () (at ./Library/PackageCache/[email protected]/Scripts/Runtime/TMP_PackageResourceImporter.cs:28)
TMPro.TMP_PackageResourceImporterWindow:OnDestroy () (at ./Library/PackageCache/[email protected]/Scripts/Runtime/TMP_PackageResourceImporter.cs:261)
UnityEditor.ContainerWindow:InternalCloseWindow ()
Carthusian answered 12/12, 2023 at 10:59 Comment(0)
C
0

UPDATE:

I tried downgrading TMP to the release version (3.0.6) to see if that fixed it, and it did! I also didn’t have the build problem anymore and managed to build the game just fine. For a while that is. Now I’m having the "essentials missing" error again, even tough I barely made any additions to the code, and those additions had nothing to do with TMP. Here is the new error:

NullReferenceException: Object reference not set to an instance of an object
TMPro.TMP_Settings.get_defaultStyleSheet ()
at ./Library/PackageCache/[email protected]/Scripts/Runtime/TMP_Settings.cs:303

Please help I’m going insane lol.

Carthusian answered 19/11, 2023 at 17:31 Comment(0)
M
0

For those that just updating does not work, I had to close project, reopen.
Then delete the TMP folder in project (giving me about 191 errors), redownload (which would then come back to this error) then close project again and reopen. Now it works just fine for the moment, but I get weird queue issues from time to time if I leave project open for too long,

Masterstroke answered 19/11, 2023 at 17:31 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.