- Home /
How to get the screen Position of a particular character/letter in TextmeshproUGUI ?
I want to place an arrow png below the "?" in TextMeshPro like in the image but for that, I want to know the exact position of the "?" character in TextMeshPro with respect to its parent.
How can I get the exact position?
Thanks!
Answer by angelromp06 · May 06, 2020 at 01:14 PM
Well @rohitvishwakarma1819 I think I know the answer to this. What I've understood is that you want a variable or something to tell you it's position on x-axis and z- axis. There is a type of variable for this named transform. All you have to do to create this variable is to write in a script (supposing player is the object you want to its position) using UnityEngine;
public class Position : MonoBehaviour {
public Transform player;
}
Now all you have to do is drag the game object you want to the box that says player or whatever your variable's name is and that variable shows forever your current Game object position.
Your answer
Follow this Question
Related Questions
Character position in a TextMesh object 0 Answers
Why Do My Obstacles Do This In My Object Pooler? 1 Answer
How to increment value of axis when something happens 2 Answers
TextMesh/3DText modify shape 0 Answers
Screen to world point - parented camera 0 Answers