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 ()