Scripting a "Unity Editor"-like object transformation control

In Unity Editor, one can manipulate object easily with "position", "rotation", and "scale" by pulling simple control bars around the object and have user pull on it.

How might one approach making this feature in a game? Thanks

Long answer short (I'm at work) check out these 2 links. Make an editor script adding Handles to a script Component you'd add to the desired GameObjects.

UNITY: Editor scripts

UNITY: Handles class

I'll try to add more info from home.