TextMesh Pro Open Source Repository?

Are there any plans to make the new Unity integrated TextMesh Pro package a publicly available open-source repository? Just like the Unity UI and networking packages. I’m very interested in trying to maybe help improve the TextMesh Pro inspector and I’m sure there are many other talented people in the community that would love to contribute to the project as well. So this seems like a natural next step.

With Unity 2018.1, TMP will be available via the new Unity Package Manager and in 2018.2 should be included with the Editor by Default.

Currently, I am not sure what the plans are with respect to providing access to Repositories for packages so I will have to inquire about this.

Until then, since the version of TMP available for 2018.1 includes source code, please feel free to share any suggestions directly to me via email or pm.

From what I understand, source code is only included in the old paid version, which I do not own. Are you talking about some new free version that now includes the source? I’ve checked the latest free Asset Store versions of TMP, but can’t find any source.

Correct. The release for Unity 2018.1 which is delivered via the Unity Package Manager includes source code.

Thanks. Where exactly are Package Manger packages and the source code located on Windows?

The Unity Package Manager is a new feature in 2018.1. you need to access it via the Window menu as seen below

3389571--266471--upload_2018-2-12_19-11-18.png

Once the Package Manager is open, you will find TextMesh Pro listed in there.

3389571--266472--upload_2018-2-12_19-12-25.png

Please be sure to follow the instruction posted here for installing and upgrading to this new version.

Packages are installed in a central location which is on Windows is C:\ProgramData\Unity\cache\packages\packages.unity.com

There you will find the folder for the various version of TMP that have been installed with UPM.

2 Likes

I have already installed TMP using the Package Manager in 2018.1 beta. Problem is I don’t know where the actual source code folder is after doing so. Kind of the same issue Player7 had in the thread you linked to:

From my previous post

1 Like

Oops! Sorry, I totally missed that part of your reply. Probably because I thought it was just covering installation. Found it now. Thank you very much for taking the time to help such a clueless idiot. :slight_smile:

Here is an update for anyone else who is trying to see the source. As of 2018.1.1f1 the packages are no longer in C:\ProgramData and are located at this path:

C:\Users\Username\AppData\Local\Unity\cache\packages\packages.unity.com

4 Likes

Hi Stephan,

I have been handed a legacy Unity project, which includes a dated (2016) version of the paid TMP add-on. The complexity of the project means that updating to the free version is not really a feasible option. Would it be possible to e.g. pay for a TMP license to get access to the latest paid TMP?

With thanks,
Sigurd

It is no longer possible to purchase TextMesh Pro. However, the version of TextMesh Pro available via the package manager includes source code and a utility to convert existing TMP related files to the new GUID and File ID set used by these new versions.

That is very helpful. Is there a means of making this approach work in older versions of Unity? - the project runs in Unity 5.6.5

Unfortunately not on earlier versions.

I would suggest reaching out to your Unity account rep to see if they can work something out.

How do I determine who is my “Unity account rep” and their contact details?

Hi Stephan,

Do you have an update on this? Packages like PostProcessing or the Scriptable Render Pipeline (which is a whole set of packages) are already on GitHub, and that is really helpful because the package manager does some really nasty things when you just quickfix issues you run into (it will frequently just overwrite those changes, without any warning), and embedding packages takes them out of version control, so you can’t really update the package once you made changes … plus, a GitHub repository would let us do pull requests, which would also make your life easier :wink:

The issue that prompted me to look for the GitHub repository of TextMesh Pro (a search that ended up here):

From TextMesh Pro 1.3.0 to 1.4.0, TMP_InputField broke really badly in our project, which uses the SteamVR Keyboard for input. Finding that issue would have been really easy for me if I had had the history of TMP_InputField.cs. Without source code repository access, I had to try one version after the other (going backwards from 2.0.1).

And now that I have the fix, I have to copy it over to various locations.

The issue is that under some circumstances, inputSystem (which is a private property of TMP_InputField) can be null. Interestingly, for compositionString, that case is properly covered by having another property that uses inputSystem, if it is not null, and Input, if it is. What I did to fix my issue was adding three more similar properties:

        private Vector2 compositionCursorPos
        {
            get { return inputSystem != null ? inputSystem.compositionCursorPos : Input.compositionCursorPos; }
            set { if (inputSystem != null) { inputSystem.compositionCursorPos = value; } else { Input.compositionCursorPos = value; } }
        }

        private bool touchSupported
        {
            get { return inputSystem != null ? inputSystem.touchSupported : Input.touchSupported; }
        }

        private IMECompositionMode imeCompositionMode
        {
            get { return inputSystem != null ? inputSystem.imeCompositionMode : Input.imeCompositionMode; }
            set { if (inputSystem != null) { inputSystem.imeCompositionMode = value; } else { Input.imeCompositionMode = value; } }
        }

… and then, of course, remove all instances of “inputSystem.” in the remaining file so that instead of accessing those properties of inputSystem (which could be null), the locally defined properties with the fallback to Input are called.

So, yeah, being able to send you a Pull request would make this a whole lot easier (besides, I just fixed another, unrelated issue where a Null-check was missing … another trivial Pull-request, if I could create one).

2 Likes

I agree with jashan. The developer has done an amazing job with it, but I think it’s an excellent idea to make it open source on GitHub ,so the community can help out improving it.

2 Likes

@jashan if that’s still an issue and not reported I’d recommend to report a Unity bug on their issue tracker so it can be fixed internally.
I agree, there are a lot of spots where debugging into Unity’s code would be awesome (UI for example)

You can also access the source files directly from the Unity Editor (Project View → Packages)
5651278--587644--upload_2020-3-31_7-44-3.png

Opening them like this lets you debug the scripts in VS.

The issue is not accessing the source files, that part is trivial. The issue is that the source files are downloaded by the package manager and in no way connected to version control. And there’s no way to fix that because there is no public repository for TextMesh Pro. So any changes that you make in the source code will put you into “manual-merge-with-source-control-hell” (you need to make a backup, update the package, then manually look for any changes … or, put the whole package into your own version control, which at least solves the “have to make a backup” step).

2 Likes