1 GUI. Windows window
static function Window (Id:int, Clientrect:rect, Func:windowfunction, Text:string, Style:guistyle): Rect
Windowrect = GUI. Window (0, Windowrect, Domywindow, "My window");
(Note that after the form is created, remember to assign it to the form again)
Gui. Dragwindow (New Rect (0, 0, 10000, 10000));
2 Mathf.clamp Limit
static function Clamp (Value:float, Min:float, max:float): float
Limits the value of values between Min and Max, and returns min if value is less than min. Returns max if value is greater than max, otherwise returns value
3 GUI. Dragwindow ();//gui. Dragwindow () function must be written in the back of other code, otherwise there will be a scary thing
4 GUI. Toolbar Toolbar
public int toolbarint = 0;//is the index number of the selected button.
Public string[] toolbarstrings = new string[] {"Toolbar1", "Toolbar2", "Toolbar3"};
void Ongui () {
Toolbarint = GUI. Toolbar (New Rect (+,-), Toolbarint, toolbarstrings);
}
5 GUI. Box Draw Texture
Gui. Box (Rect (0,0,screen.width,screen.height), "This is a title");
6 Set GUI picture, select picture
6.1 Texture Set as GUI
6.2 Max size is set according to the size of the picture
6.3 format is set to TrueColor
7 GUI. Beginscrollview Start scrolling View
Returns the Vector2 type, modified by the scroll position scrollposition. The return value should be passed back to your variable, as shown in the following example.
We create a 100,100 scrolling view with scrolling content of 220,200, which is what we want to see larger than the scrolling view
Scrollposition = GUI. Beginscrollview (Rect (10,300,100,100), scrollposition, rect (0, 0, 220, 200));
Customizing skin usage Steps
1 Resource window create--"GUI skin--" Custom style, set the first off property (note the settings in the border property)
2 in Ongui Gui.skin = Customskin; (Assigned to the skin, otherwise it will be the default skin)
3 using GUI.skin.GetStyle ("WINDOWRECTB") when creating a window
eg.
WINDOWRECTB = GUI. Window (0, WINDOWRECTB, Mydowindow, "", GUI.skin.GetStyle ("WINDOWRECTB"));
The GUI uses the basic function of the