can't find the solution to adding text mesh pro text in inspector

So i am following the unity learn Create with Code and in the TextMeshPro section it says to assign the Text Mesh Pro text in the inspector. When attempting it does not allow me to (see screen captures for details).
Im on Version 2021.3.
8730237--1181247--upload_2023-1-14_9-56-18.png
I have included the include tmPro statement and have assigned a textmesh pro object in the C code at the enter of the class called scoreText and tried both Public and serialized to make it available

and when i try and put the text into game manger in the inspector, this occurs. I see the warning about" … edit mode" but not sure what that means since i am editing and not playing with the play button. is there a setting i am missing that is preventing this?

8730237--1181250--upload_2023-1-14_9-59-15.png
in creating the object i used the right click and picked Text - TextMeshPro, which created the above object inside of the canvas object. (I did not rename it in capturing screenshots.
8730237--1181253--upload_2023-1-14_10-0-50.png

what am i doing wrong? can someone help me?

8730237--1181244--upload_2023-1-14_9-53-2.png

missed this screencap in the post above
8730255--1181268--upload_2023-1-14_10-19-6.png

2 Likes

found the issue, both the script and the player have this object. you cannot drop it on the script and must drop it on the player. Default references will only be applied in edit mode / Assining Text
original post