Sign In Start Free Trial
Account

Add to playlist

Create a Playlist

Modal Close icon
You need to login to use this feature.
  • Gamification with Unity 5.x
  • Toc
  • feedback
Gamification with Unity 5.x

Gamification with Unity 5.x

By : Lauren S. Ferro
3 (2)
close
Gamification with Unity 5.x

Gamification with Unity 5.x

3 (2)
By: Lauren S. Ferro

Overview of this book

Are you looking at implementing gamification techniques for your business and wondering where to get a complete rundown of all the tricks and techniques? Well, you have come to the right place! This book will start right from the basics such as gameplay elements and their functionalities before gradually moving onto creating your first gamification project from scratch. You’ll be given the tools and shown how to perform various techniques for creating gamified applications in different contexts. Finally, you will implement various game elements into Unity, publish your own task management application, and get to know the best practices and approaches when designing gamified experiences.
Table of Contents (11 chapters)
close

On point!


Points can come in various ways. A player can obtain points by defeating an enemy, doing the right thing, or even working cooperatively with other players. Now we have worked on a lot of images, this section shows us how to use the text component to implement a Point System.

Let's start by creating a text component. To do this, right-click on the Hierarchy panel and then select UI | Text. We can rename it Point System. Feel free to customize it as you want by changing the font, size, and so on. It doesn't matter what text you put in it, because it will be replaced by our script, but we can use anything as a placeholder. In this case, we can write Points: 100. Once we have done all of this, we should have something that looks the following screenshot, in the Scene view:

The points system in Unity

Now, let's add a script and name it PointSystemScript. Since we are going to use UI components, let's import the library by adding the following line at the beginning of our script:

using...

Unlock full access

Continue reading for free

A Packt free trial gives you instant online access to our library of over 7000 practical eBooks and videos, constantly updated with the latest in tech
bookmark search playlist download font-size

Change the font size

margin-width

Change margin width

day-mode

Change background colour

Close icon Search
Country selected

Close icon Your notes and bookmarks

Delete Bookmark

Modal Close icon
Are you sure you want to delete it?
Cancel
Yes, Delete