Setting up Dialogue System using I2 Localization not having access to TMPro

Announcements, support questions, and discussion for the Dialogue System.
etsapekis
Posts: 39
Joined: Tue Oct 12, 2021 4:21 pm

Setting up Dialogue System using I2 Localization not having access to TMPro

Post by etsapekis »

I'm trying to set up Dialogue System in my project and I have an issue with i2 support.
Assets\Pixel Crushers\Dialogue System\Third Party Support\I2 Localization Support\Scripts\DialogueSystemUseI2RTLFix.cs
throws errors on lines 84, 89, 93, 97, 101, 105, and 109, stating "error CS1061: 'UITextField' does not contain a definition for 'textMeshProUGUI' and no accessible extension method 'textMeshProUGUI' accepting a first argument of type 'UITextField' could be found (are you missing a using directive or an assembly reference?)
"
Could it be that this was written before TMPro became available in Unity's (relatively) new Packages system? Is there anything I can do to make this support Unity's (relatively) new TMPro location?
etsapekis
Posts: 39
Joined: Tue Oct 12, 2021 4:21 pm

Re: Setting up Dialogue System using I2 Localization not having access to TMPro

Post by etsapekis »

I've confirmed that if I take UITextField out of the Plugins folder , it works, but then, of course, everything else in the plugins folder that references UITextField has errors
User avatar
Tony Li
Posts: 21981
Joined: Thu Jul 18, 2013 1:27 pm

Re: Setting up Dialogue System using I2 Localization not having access to TMPro

Post by Tony Li »

Hi,

Are you using the Dialogue System's assembly definition files (asmdefs)? (If you don't know what I'm talking about, then you're probably not using them.)

If you are using the asmdefs, make sure that you've assigned the TextMeshPro asmdef to the PixelCrushers and DialogueSystem asmdefs.

Also make sure the scripting define symbol TMP_PRESENT is defined in Edit > Project Settings > Player > Other Settings > Scripting Define Symbols. If you can bring up the Dialogue System's Welcome Window, an easy way to set TMP_PRESENT is to tick the Welcome Window's "TextMesh Pro (TMP_PRESENT)" checkbox.
etsapekis
Posts: 39
Joined: Tue Oct 12, 2021 4:21 pm

Re: Setting up Dialogue System using I2 Localization not having access to TMPro

Post by etsapekis »

I was not using it, so i quickly checked out how to do it, and I added Unity.Timeline, but nothing exists for textmesh pro
User avatar
Tony Li
Posts: 21981
Joined: Thu Jul 18, 2013 1:27 pm

Re: Setting up Dialogue System using I2 Localization not having access to TMPro

Post by Tony Li »

In the Dialogue System's Welcome Window, is the TMP_PRESENT checkbox ticked?

Is TextMesh Pro installed in your project? If not, then remove TMP_PRESENT.

The TextMeshPro asmdef is in Packages (not Assets) > TextMeshPro > Scripts > Runtime. It's named "Unity.TextMeshPro".

Are you using the latest i2 Localization integration package? It's in DS version 2.2.20 and 2.2.21. Here's a copy:

DS_I2LocalizationSupport_2021-08-30.unitypackage

(Future readers: If you're using Dialogue System version 2.2.20+, don't use the link above. Use the package that's in the Third Party Support folder.)
etsapekis
Posts: 39
Joined: Tue Oct 12, 2021 4:21 pm

Re: Setting up Dialogue System using I2 Localization not having access to TMPro

Post by etsapekis »

I'm a little confused. I'm using the latest version of Dialogue System and I used the package from the Third Party Support folder already
User avatar
Tony Li
Posts: 21981
Joined: Thu Jul 18, 2013 1:27 pm

Re: Setting up Dialogue System using I2 Localization not having access to TMPro

Post by Tony Li »

Let's first make sure the Dialogue System, i2 Localization, and the integration are all working properly. We'll do this in a test project first.

In a new, empty project:

1. Make sure TextMesh Pro is installed. (Check the Package Manager window.)

2. Import i2 Localization.

3. Import the Dialogue System.

4. In the Dialogue System's Welcome Window, tick the TextMesh Pro (TMP_PRESENT) checkbox.

5. Import the Dialogue System's i2 Localization Support.

There should be no errors at this point. If there is an error after any step, please stop there and let me know which step has the error.

---

Assuming that all works correctly, let's figure out next what's going on in your actual project. You can try these steps:

1. Back up your project.

2. Make sure TextMesh Pro is installed.

3. Remove these 3 folders:
  • Assets / Plugins / Pixel Crushers / Common
  • Assets / Plugins / Pixel Crushers / Dialogue System
  • Plugins / Pixel Crushers / Third Party Support / I2 Localization Support
4. Re-import the Dialogue System.

5. In the Dialogue System's Welcome Window, make sure the TextMesh Pro (TMP_PRESENT) checkbox is ticked.

6. Re-import the Dialogue System's i2 Localization Support.

After this, please let me know if there are any errors.
etsapekis
Posts: 39
Joined: Tue Oct 12, 2021 4:21 pm

Re: Setting up Dialogue System using I2 Localization not having access to TMPro

Post by etsapekis »

ah i believe my problem is that i have a non-package manager textmesh pro. i can't seem to get the asmdef set up though...
User avatar
Tony Li
Posts: 21981
Joined: Thu Jul 18, 2013 1:27 pm

Re: Setting up Dialogue System using I2 Localization not having access to TMPro

Post by Tony Li »

How do you have a non-Package Manager TextMesh Pro? Are you using a very old version of the commercial TMPro before Unity bought it? If so, I recommend updating to the current official Unity version of TMPro. The developer has fixed a lot of bugs.

Asmdefs aren't required. Can you try not using them for the Dialogue System?
etsapekis
Posts: 39
Joined: Tue Oct 12, 2021 4:21 pm

Re: Setting up Dialogue System using I2 Localization not having access to TMPro

Post by etsapekis »

My workplace has some custom additions to TMPro. I'm gonna try TMP's conversion tool and make sure that my project isn't using any of these custom implementations... but if I have to use the custom one, it will automatically not work, even if it's up to date?
Post Reply