TextMesh Pro confusion with ammo counter


Author: Aaronn Solomon

11/3/2023


The Problem

I was attempting to create an ammunition counter for the player's mech. I decided to use a TextMesh Pro object to do this. However, when I tried to place the object under the screen object in the hierarchy, it created a canvas along with it. I was quite confused, and I obviously didn't want to make an entire canvas just for that.


The Solution

As it turns out, I was creating the wrong type of TMP object. What I actually had to do was create a 3D object that was labeled as a TMP, instead of a straight-up TMP object. Thankfully, this fixed the issue, and the canvas was not added to the hierarchy like before.