Why can't I use TMPro in Rebinding UI Sample

I tried using TMPro in Rebinding UI Sample for the Input System but when I add using TMPro it sayes
Assets\Scripts\Rebinding UI\RebindActionUI.cs(5,7): error CS0246: The type or namespace name ‘TMPro’ could not be found (are you missing a using directive or an assembly reference?)
Does anyone know how to fix it or why is it happening?

1 Like

Did you find the solution ? I’m searching it today.

Does the sample have an assembly definition the code is in? If so, you need to add a reference to the TMPro assembly definition.

Had this same problem and was a little hard to find, but easy to solve.
You just need to add an assembly reference to TMPro in the Assembly Definition Asset of the Rebinding UI.

In my case it was Assets > Samples > Input System > 1.14.0 > Rebinding UI
Click on the .asmdef file on the inspector > click on the “+” symbol under Assembly Definition References and search for TextMesh and add all references for it.

After it the script will recognize the using TMPro.