3D Text .anchor

Hi,
I have a sample question I have two text mesh in my scene and I want to change anchor of second text, And I know for this we should use this code

GetComponent(TextMesh).anchor = TextAnchor.MiddleCenter;

But where should I put my text name? I just want to change anchor of second text

Please help thanks

I thought this is a simple question

Up

Solved, Thanks for nothing :smile: