- Home /
Temporarily moving the origin point of the GUI
Back when I was programming using Processing, we were able to translate the point that shapes would be drawn from. For example, if I translated to (100px, 0px), then drew a shape at (5px, 5px), the shape would actually be drawn at (105px, 5px).
This feature is very useful when you have multiple nested components, so you no longer need to add the position of the parent objects at each GUI call. This works in a similar way that unity handles its Game Object positions.
Here is a processing article on the subject.
Is there an option like this for the Unity GUI?
Answer by Jamora · Jul 20, 2013 at 10:49 PM
This sounds like either GUI.BeginGroup or GUILayout.BeginArea. Everything drawn inside either will have its (0,0) at the upper left corner of the Rect passed as a parameter to the group/area. It's all explained in the GUI Scripting Reference, in Layout modes.
Your answer
Follow this Question
Related Questions
how to translate(Bengali) Gui, tools, tabs and other things 0 Answers
Where is configuration of launcher window? 1 Answer
GUI 2D Bounding Box 1 Answer
Making iTween work with OnGUI functions 3 Answers