Attach GUI.Textfiedl to an object location?

right now my textfields are set to a x,y,z location which only works if the game is allways run in the same aspect ratio / resolution

otherwise they move to diffrent spots on the screen. was thinking about just setting there location to a gameobject and that should take care of it. just not sure on the code.

Try using Camera.WorldToScreenPoint. Get the position of said GameObject, convert it using the WorldToScreenPoint function, and then set that to the output position of your GUI element.