Search icon
Arrow left icon
All Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletters
Free Learning
Arrow right icon
Unity 2022 Mobile Game Development - Third Edition

You're reading from  Unity 2022 Mobile Game Development - Third Edition

Product type Book
Published in Jun 2023
Publisher Packt
ISBN-13 9781804613726
Pages 480 pages
Edition 3rd Edition
Languages
Author (1):
John P. Doran John P. Doran
Profile icon John P. Doran

Table of Contents (21) Chapters

Preface 1. Part 1: Gameplay/Development Setup
2. Chapter 1: Building Your Game 3. Chapter 2: Project Setup for Android and iOS Development 4. Part 2: Mobile-Specific Features
5. Chapter 3: Mobile Input/Touch Controls 6. Chapter 4: Resolution-Independent UI 7. Chapter 5: Advanced Mobile UI 8. Chapter 6: Implementing In-App Purchases 9. Chapter 7: Advertising Using Unity Ads 10. Chapter 8: Integrating Social Media into Our Project 11. Part 3: Game Feel/Polish
12. Chapter 9: Keeping Players Involved with Notifications 13. Chapter 10: Using Unity Analytics 14. Chapter 11: Remote Config 15. Chapter 12: Improving Game Feel 16. Chapter 13: Building a Release Copy of Our Game 17. Chapter 14: Submitting Games to App Stores 18. Chapter 15: Augmented Reality 19. Index 20. Other Books You May Enjoy

Using Unity Analytics

Making a game is a wonderful experience and a lot of hard work, but when designing projects, you have to rely on your experience and gut feelings in order to make it as awesome as possible. Often, in the game industry, we will use playtesting – a process where select people play a game and give feedback, and then we use the feedback we receive to improve the project.

This playtesting is most often done in person; however, by creating games for mobile, a lot of people will be playing your game after release, and most of them will have an internet connection. With this combination of people playing the game and also being online, we can send data about how the game is being played to ourselves. This will still allow us to do playtesting with a large variety of people. Being able to look at our data will allow us to check whether the choices that are made to change the game are the right ones, and we will be able to make adjustments to our games on the...

Technical requirements

This book utilizes Unity 2022.1.0b16 and Unity Hub 3.3.1, but the steps should work with minimal changes in future versions of the editor. If you would like to download the exact version used in this book, and there is a new version out, you can visit Unity’s download archive at https://unity3d.com/get-unity/download/archive. You can also find the system requirements for Unity at https://docs.unity3d.com/2022.1/Documentation/Manual/system-requirements.html in the Unity Editor system requirements section. To deploy your project, you will need an Android or iOS device.

You can find the code files present in this chapter on GitHub at https://github.com/PacktPublishing/Unity-2022-Mobile-Game-Development-3rd-Edition/tree/main/Chapter10.

Setting up Analytics

Although we activated the Analytics option from Unity Gaming Services in order to use Unity’s Ads system in Chapter 7 Advertising Using Unity Ads, we didn’t really dig deep into the system itself. Let’s finish the setup for that now using the following steps:

  1. To start, we need to install the Unity Analytics package in our project. We can do so by returning to the Unity Editor and opening the package manager, by going to Window | Package Manager.
  2. There is a bug with the version of Unity this book was written for, with the Analytics package not showing up by default; instead, Unity shows the legacy Analytics Library package. However, it is possible to add the new package by clicking on the + button at the top left and then selecting the Add Package by Name option. From there, type in com.unity.services.analytics. If all goes well, you should be able to see that the Analytics package has been installed correctly by checking the Package...

Tracking custom events

Unity Analytics does a number of different things automatically to make it easy to work with. However, as a game designer, you may often want to check whether certain aspects of a game are being used or whether players are reaching certain pieces of content. To keep track of this, we can make use of the custom events system.

Custom events are pieces of data that users send to the cloud as they play a game. Each custom event can have its own parameters, which will allow us to filter the data that we send when it is generated. We will discuss how you can send information over the cloud through the use of code.

Sending basic CustomEvents

The first kind of event we are going to send is just an event name. This can be used for something such as tracking the number of times people access a certain place or checking whether something invalid appears to be happening. To make it easy to trigger and track for testing purposes, we will cause an event to happen...

Working with funnels

One of the many things we’d like to know about our players is how they are actually playing a game – for instance, are users skipping our tutorial? To keep track of how players proceed through a series of events, we have funnels. Funnels help us to identify where player drop-off happens in our game.

If you happen to see a large number of people not getting to a certain step, you can assume that something that happened in the preceding step causes people to stop playing our game.

Note

For more information on how funnels work as well as why you’d want to use them, check out https://data36.com/funnel-analysis/.

Funnels are based on the concept of custom events, which we used in the Sending custom events with properties section of this chapter. We can use the Funnels tool (previously known as the Funnel Analyzer) to look at the data sent via these funnels, which we can then use to make educated decisions on what changes should be made...

Summary

In this chapter, we explored a number of ways that we can make use of Unity’s Analytics tool to make our games better, from how to understand what our players are doing to learning how to adjust our game based on that feedback, without users having to download an entirely new copy of our game.

Specifically, we learned how to set up the Unity Analytics section of the Unity Editor, and then we saw how we can make use of code to create events to be sent to the cloud for us to look at. With the given data, we learned how we could make use of funnels and the Funnel Analyzer to learn more about our players.

Now that we have seen how to create events, let’s see one of the other main benefits of utilizing Unity Gaming Services – being able to change projects using the Remote Config feature, which we will learn more about in the next chapter.

lock icon The rest of the chapter is locked
You have been reading a chapter from
Unity 2022 Mobile Game Development - Third Edition
Published in: Jun 2023 Publisher: Packt ISBN-13: 9781804613726
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at €14.99/month. Cancel anytime}