Calculate pixel length of string (not GUI)

Hey Guys,

i was wondering if there is a way to get the length of a string, which is going to be the value of a TextMesh. So its not GUI based, which i found out that strings on GUIstyle can be measured.

Thanks in advance.

A TextMesh is a 3d object - it has no “pixel length”, as its appearance will vary depending on the camera through which it is being viewed.