Sign In Start Free Trial
Account

Add to playlist

Create a Playlist

Modal Close icon
You need to login to use this feature.
  • Book Overview & Buying Creating E-Learning Games with Unity
  • Table Of Contents Toc
Creating E-Learning Games with Unity

Creating E-Learning Games with Unity

By : David Horachek
4.4 (10)
close
close
Creating E-Learning Games with Unity

Creating E-Learning Games with Unity

4.4 (10)
By: David Horachek

Overview of this book

Table of Contents (17 chapters)
close
close
Creating E-Learning Games with Unity
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
1
Index

Exploring UnityScript and the GUIButton object


The Unity Editor is laid out with an internal GUI-specification language called UnityGUI. This API is only accessible to Unity game programmers from within C# (and JavaScript) code, unlike the previous GUI elements that can be placed and adjusted within the editor itself at design time. We can use this to place buttons, textures, pop-up windows, tooltips, and many other UI primitives. The difference in use from the previous examples is that the elements are instanced and placed entirely from the script rather than at design time in the editor. For our dialog pop-up Prefabs, we will explore the GUI.Button class.

Using UnityGUI

To use the UnityGUI functionality, we must invoke the commands from within a special callback, OnGUI(). As this function is not created by default when you create a new C# script in Unity, you need to add it yourself. The Unity Engine will invoke this method automatically when GUI elements are to be redrawn; so, we put our...

CONTINUE READING
83
Tech Concepts
36
Programming languages
73
Tech Tools
Icon Unlimited access to the largest independent learning library in tech of over 8,000 expert-authored tech books and videos.
Icon Innovative learning tools, including AI book assistants, code context explainers, and text-to-speech.
Icon 50+ new titles added per month and exclusive early access to books as they are being written.
Creating E-Learning Games with Unity
notes
bookmark Notes and Bookmarks search Search in title playlist Add to playlist font-size Font size

Change the font size

margin-width Margin width

Change margin width

day-mode Day/Sepia/Night Modes

Change background colour

Close icon Search
Country selected

Close icon Your notes and bookmarks

Confirmation

Modal Close icon
claim successful

Buy this book with your credits?

Modal Close icon
Are you sure you want to buy this book with one of your credits?
Close
YES, BUY

Submit Your Feedback

Modal Close icon
Modal Close icon
Modal Close icon