How do i centralize one string in any viewport size?

Hi, I want to create the subtitle system to my game, but i don't know how centralize the text on the screen!

Use a GUIStyle: Set to center, much like html

Another way, what I did, was make an empty game object, call it 'captions' or something. Add a GUIText component, set its attributes to Anchor middle center and Alignment center. Attach your script to same object.