I’m trying to do unit testing on a project that uses TextMeshPro and I’m running into this error: “error CS0246: The type or namespace name ‘TMPro’ could not be found (are you missing a using directive or an assembly reference?)”. Here are the steps to recreate:
- Create a Project
- Install TextMeshPro from the package manager
- Create a script that uses TextMeshPro
- Create an assembly reference in the same directory as the script
- Use the Test Runner to create an Edit Mode test folder
- Create a test
- Create a reference in the Edit Mode Assembly Reference to the script assembly reference
- Create a reference in the Edit Mode Assembly Reference to Unity.TextMeshPro
This issue is similar to the below link, but I wasn’t able to solve my issues with the solutions there.