Unity Tutorial 6: Basic Scripting: GUI

Published: 05 December 2013
on channel: UnityEducationSite
528
3

In this tutorial we are learning the basics of GUI.

Unity 3D Official Site: http://unity3d.com/

Our Script that we wrote so far:

using UnityEngine;
using System.Collections;

public class BasicGUI : MonoBehaviour
{
Rect buttonRect = new Rect(0, 0, 200, 100);
Rect labelRect = new Rect(0, 110, 200, 100);
Rect boxRect = new Rect(0, 210, 200, 100);

void OnGUI()
{
if(GUI.Button(buttonRect, "Click Me!"))
{
Debug.Log("Hello World");
}

GUI.Box(boxRect, "Im a box!");

GUI.Label(labelRect, "Hello fat boy!");
}
}


On this page of the site you can watch the video online Unity Tutorial 6: Basic Scripting: GUI with a duration of hours minute second in good quality, which was uploaded by the user UnityEducationSite 05 December 2013, share the link with friends and acquaintances, this video has already been watched 528 times on youtube and it was liked by 3 viewers. Enjoy your viewing!