On Sale: GamesAssetsToolsTabletopComics
Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
Tags

Super Text Mesh Data not initialized.

A topic by Go_Boho created 57 days ago Views: 135 Replies: 6
Viewing posts 1 to 7

Hello,

We are receiving the following when running our game:

Super Text Mesh Data not initialized. This might happen when first importing or updating Super Text Mesh. If this persists, please make sure Super Text Mesh's 'Resources' folders are left where they were upon import.
UnityEngine.Debug:Log (object)
SuperTextMesh:get_data () (at Assets/Clavian/SuperTextMesh/Scripts/SuperTextMesh.cs:737)
SuperTextMesh:get_GetTime () (at Assets/Clavian/SuperTextMesh/Scripts/SuperTextMesh.cs:861)
SuperTextMesh:Rebuild (single,bool,bool) (at Assets/Clavian/SuperTextMesh/Scripts/SuperTextMesh.cs:1694)
SuperTextMesh:Rebuild (single,bool) (at Assets/Clavian/SuperTextMesh/Scripts/SuperTextMesh.cs:1645)
SuperTextMesh:Rebuild () (at Assets/Clavian/SuperTextMesh/Scripts/SuperTextMesh.cs:1635)
SuperTextMesh:SpecialRebuild () (at Assets/Clavian/SuperTextMesh/Scripts/SuperTextMesh.cs:1431)
SuperTextMesh:OnRectTransformDimensionsChange () (at Assets/Clavian/SuperTextMesh/Scripts/SuperTextMesh.cs:5674)
UnityEditor.EditorApplication:Internal_RestoreLastOpenedScenes ()

We are unsure how we can go about fixing this in our title. We believe the resources folder is where it was on import but we're not certain. Is there a specific location where it needs to be? 

We are also receiving the following as well:

NullReferenceException: Object reference not set to an instance of an object
SuperTextMesh.get_GetTime () (at Assets/Clavian/SuperTextMesh/Scripts/SuperTextMesh.cs:861)
SuperTextMesh.Rebuild (System.Single startTime, System.Boolean readAutomatically, System.Boolean executeEvents) (at Assets/Clavian/SuperTextMesh/Scripts/SuperTextMesh.cs:1694)
SuperTextMesh.Rebuild (System.Single startTime, System.Boolean readAutomatically) (at Assets/Clavian/SuperTextMesh/Scripts/SuperTextMesh.cs:1645)
SuperTextMesh.Rebuild () (at Assets/Clavian/SuperTextMesh/Scripts/SuperTextMesh.cs:1635)
SuperTextMesh.SpecialRebuild () (at Assets/Clavian/SuperTextMesh/Scripts/SuperTextMesh.cs:1431)
SuperTextMesh.OnRectTransformDimensionsChange () (at Assets/Clavian/SuperTextMesh/Scripts/SuperTextMesh.cs:5674)
UnityEditor.EditorApplication:Internal_RestoreLastOpenedScenes()

We're also unsure how to go about fixing this issue.

We are using Unity 2022.3.16f1. Any help would be greatly appreciated! 

Thanks

Developer

1) For the Resources folder, just make sure that the "Resources" folder withing the "Super Text Mesh" folder is where it should be - it's important that *all* of the folders within keep the same names. (The folders are named things like STMDelays, STMGradients) They can be moved to a different folder named "Resources" but for organizational reasons, it's much easier to keep them where they are. The error you received is specifically for the file "SuperTextMeshData" being moved from this folder, so please make sure it stays in a folder named "Resources".

If you receive this message upon first importing STM, it's normal.

2) This error is being called because "data" is null... "data" is a the variable that points towards the above "SuperTextMeshData" file, so I believe these errors are one and the same.


So... please make sure the "SuperTextMeshData" file is in a folder named "Resources"! I believe that will solve the issue.

Hello and thank you for your response.

I am seeing that the "SuperTextMeshData" file is already in the Resources folder. Is it possible that it needs the other "SuperTextMeshData" file in there as well? I see that there is a similarly named file within the scripts folder as well.

Thank you for your time!

I should note that these issues started happening after I tried updating Super Text Mesh. The project was using a version from 2021 I believe. 

Developer

The one in the scripts folder is the script for that file, while the one in the Resources folder is a scriptableobject. Because you updated from an old project, it might be possible that the old file either got duplicated or the metadata got assigned to the wrong object... The file used to be formatted differently in older versions of STM, so it's possible for something like that to happen... Does the error persist if you go into the text data editor (click the [T] in the top-right of any STM inspector), scroll down, and click "Refresh Database"?

When you search your entire project folder for "SuperTextMeshData", is the ScriptableObject and the .cs file the only two files that show up? If there's more than that, see if there's a copy of the ScriptableObject somewhere, that would cause this problem, too

Hello and thank you for your response.

When searching "All" we only see the SuperTextMeshData script, the SuperTextMeshData scriptableobject, and the SuperTextMeshDataIcon.

Apologies but are you able to clarify the instructions regarding "Refresh Database"? This is the only thing we see in the inspector window when looking at a SuperTextMesh:

Thank you for your time.

Developer

Hm, if you're seeing that when looking at the inspector for STM, something is very wrong... can you try a full re-import? Try doing a backup of your project (if you have custom Text Data files, these can be added back by putting them in the right folders and using the "Refresh Database" button I mentioned later, which should hopefully comeback once this is done...), then completely delete the SuperTextMesh folder, then re-import the asset. With any luck, settings you have on individual text objects should carry over properly. So please do this backup just in case a step gets missed or it doesn't go well, we can just try again.

I try to make the upgrade process smooth from version-to-version (in the docs, I'll list any major changes underneath the changelog), but when going past multiple versions, it's possible for things to break if the right steps aren't taken... Based on this evidence, I think some file got misplaced or not updated properly between imports?