Standard Dialogue UI not allowing Text Mesh Pro use/UITextField issues

Announcements, support questions, and discussion for the Dialogue System.
MattDan
Posts: 9
Joined: Wed Jan 08, 2020 6:00 pm
Location: Portland, OR
Contact:

Standard Dialogue UI not allowing Text Mesh Pro use/UITextField issues

Post by MattDan »

Hi there,

Recently started using Unity 2021.3.6f1 along with Dialogue System 2.2.33 and have been having an issue where the Standard Dialogue UI is no longer allowing me to use TextMeshProUGUI for anything.

Here is what it looks like now in Unity 2021.3.6f1:
after.png
after.png (58.67 KiB) Viewed 934 times
And here is what it used to look like when I used Unity 2020.1.2f1
before.png
before.png (62.07 KiB) Viewed 934 times
It's an issue that shows up across all of the templates that use Standard Dialogue UI. I'm aware that the Dialogue System uses its UITextField class that allows for use of multiple types of text. I'm a bit baffled why it's not showing up, as if TMP isn't even detected.

I dug into the UITextfield.cs and commented out these lines around line 28 & 40

Code: Select all

//#if TMP_PRESENT 
//#endif 
It actually did make the TextMeshPro UGUI option show back up in the inspector! However, none of the subtitles or alerts are going through correctly (just shows the default "alert text" I have entered in the prefab) and I'm still getting the warning in my log: "Dialogue System: No UI text element is assigned to Standard Dialogue UI's Alert UI Elements."

I'm a bit stumped. Any ideas?
User avatar
Tony Li
Posts: 21033
Joined: Thu Jul 18, 2013 1:27 pm

Re: Standard Dialogue UI not allowing Text Mesh Pro use/UITextField issues

Post by Tony Li »

Hi,

Open the Dialogue System Welcome Window (menu item Tools > Pixel Crushers > Dialogue System > Welcome Window) and make sure the TMP_PRESENT checkbox is ticked, or go to Project Settings (menu item Edit > Project Settings) and in Player > Other Settings > Scripting Define Symbols, add TMP_PRESENT.

If that fixes it, you may also want to reimport version 2.2.33 to undo the changes you made.
MattDan
Posts: 9
Joined: Wed Jan 08, 2020 6:00 pm
Location: Portland, OR
Contact:

Re: Standard Dialogue UI not allowing Text Mesh Pro use/UITextField issues

Post by MattDan »

Wow, that was so easy. I feel silly now for trying to find the hardest way to solve the problem, lol. :roll:

Thanks again!
User avatar
Tony Li
Posts: 21033
Joined: Thu Jul 18, 2013 1:27 pm

Re: Standard Dialogue UI not allowing Text Mesh Pro use/UITextField issues

Post by Tony Li »

Glad to help! Something must have removed the TMP_PRESENT Scripting Define Symbol, possibly something related to the Unity upgrade. This can also happen if you switch build platforms (e.g., from Standalone to WebGL) since each platform maintains its own list of Scripting Define Symbols. If the TextMesh Pro fields go missing again, the Scripting Define Symbols is the first thing to check.
Puppii
Posts: 20
Joined: Tue Jun 06, 2023 6:57 pm

Re: Standard Dialogue UI not allowing Text Mesh Pro use/UITextField issues

Post by Puppii »

Hello,

I am having a similar issue, of the TMP field not being available on the Standard UI Subtitle Panel (I've modified the VN Template).
I have double checked to make sure the TMP_PRESENT is there under the Scripting Define Symbols, and I it is also checked on the welcome window.
I restarted Unity, but I haven't had any luck.
User avatar
Tony Li
Posts: 21033
Joined: Thu Jul 18, 2013 1:27 pm

Re: Standard Dialogue UI not allowing Text Mesh Pro use/UITextField issues

Post by Tony Li »

Hi,

Did you unassigned the Text element?

If so, and if you still don't see the TextMeshProUGUI field, are there any errors or warnings in the Console window?
Puppii
Posts: 20
Joined: Tue Jun 06, 2023 6:57 pm

Re: Standard Dialogue UI not allowing Text Mesh Pro use/UITextField issues

Post by Puppii »

Hi Tony,

Sorry for my late response.
I did remove the text element via the inspector.
No errors or warnings are being thrown with this current setup.
PC Name is the field I am trying to get the TMP version to show up for.
Image
User avatar
Tony Li
Posts: 21033
Joined: Thu Jul 18, 2013 1:27 pm

Re: Standard Dialogue UI not allowing Text Mesh Pro use/UITextField issues

Post by Tony Li »

Can you assign TextMeshProUGUI components to any other fields, such as the response button's Label, or the StandardUISubtitlePanel's Subtitle Text field?
Puppii
Posts: 20
Joined: Tue Jun 06, 2023 6:57 pm

Re: Standard Dialogue UI not allowing Text Mesh Pro use/UITextField issues

Post by Puppii »

Hi Tony,

I am having the same issue with all of the panels. However, I went ahead and moved forward using standard text, and when I went to compile a test build I did get a few errors in the console (21 actually) and the build failed, but the first few relate to Text Mesh Pro specifically, so I think I'm getting closer to figuring it out. I just have no clue where to go from here.
I don't want to post more error messages than are necessary, so I'll just share a couple here, but let me know if you think any more might be helpful, or if you might have a clue on what my problem is based on this info.

Code: Select all

Type '[Assembly-CSharp-firstpass]PixelCrushers.DialogueSystem.TextMeshProTypewriterEffect' has an extra field 'autoScrollSettings' of type 'PixelCrushers.DialogueSystem.TextMeshProTypewriterEffect+AutoScrollSettings' in the player and thus can't be serialized 
UnityEngine.GUIUtility:ProcessEvent (int,intptr,bool&)

Code: Select all

Type '[Assembly-CSharp-firstpass]PixelCrushers.DialogueSystem.TextMeshProTypewriterEffect' has an extra field 'onBegin' of type 'UnityEngine.Events.UnityEvent' in the player and thus can't be serialized 
UnityEngine.GUIUtility:ProcessEvent (int,intptr,bool&)

Code: Select all

Fields serialized in target platform, class 'PixelCrushers.UITextField'
    'm_uiText' of type 'UnityEngine.UI.Text'
    'm_textMeshProUGUI' of type 'TMPro.TextMeshProUGUI'

UnityEngine.GUIUtility:ProcessEvent (int,intptr,bool&)

Code: Select all

Error building player because script class layout is incompatible between the editor and the player.
User avatar
Tony Li
Posts: 21033
Joined: Thu Jul 18, 2013 1:27 pm

Re: Standard Dialogue UI not allowing Text Mesh Pro use/UITextField issues

Post by Tony Li »

Hi,

Those errors suggest that your Dialogue System installation has some duplicate scripts -- for example, if you had originally imported the evaluation version (which uses DLLs) and then imported the Asset Store version without first removing the DLLs. Can you try the following?

1. Back up your project.

2. Remove this folder: Assets/Plugins/Pixel Crushers

3. Reimport the current version of the Dialogue System.
Post Reply