Keep Gamers Gaming — Application Monitoring for Unity
Tags: gamedev, unity3d, monitoring
Published: 2021-10-28 16:48:42

By: [Rahul Chhabria](https://blog.sentry.io/authors/rahul-chhabria)

Given the millions of registered Unity developers worldwide, Unity is arguably the most popular engine used to develop games. But, whether you’re building the latest FPS or a turn-based classic, you need visibility in how your game is performing on a gamer’s device.

More than 800 game development and platform companies rely on Sentry, from [OutFit7](https://sentry.io/customers/outfit7/) to [Riot](https://sentry.io/customers/riot/), Epic Games, and Unity. With Sentry, Unity and the rest of these organizations see the events (both errors and performance issues now) that actually matter, solve code issues quickly, and learn how each release performs over time.

To help Unity developers monitor their code across platforms and devices, we updated [Sentry for Unity](http://sentry.io/for/unity). Now you don’t have to figure out what device, the OS, seeing slow transactions, or deal with app version fragmentation when something goes wrong. This means that while your players are trying to catch them all, Sentry is catching all your errors and performance issues, and telling you how to fix them before they affect the player experience.

#Performance Monitoring#

Now, errors are only half the story. Unity developers also need to see if they’re providing a snappy and responsive gaming experience. That visibility means being able to know that your game is loading objects in a given viewport quickly and responding to user input as intended without any delay. Without this data, untreated performance problems can become serious errors. [Performance](https://sentry.io/for/performance), our aptly named performance monitoring solution, quickly highlights what occurred for a specific error or issue, the conditions that caused the bottleneck or latency issue, and the endpoints or operations that consume the most time.

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/d8npj7jol394ol4guc81.png)

If you’re feeling adventurous—and based on how many of you adopted early-access Sentry for Unity (> 500 teams, but who’s counting?), many of you are—you can now try Performance Monitoring for Unity in Early Access. Check out the [docs](https://docs.sentry.io/platforms/unity/performance/) or the [performance tab in product](https://sentry.io/orgredirect/organizations/:orgslug/performance/) to configure tracing.

#Native Crash Reporting#

For you iOS and Android game developers, there are some monitoring services that can report back when your game crashes—but events are usually just listed as an “abnormal session.” With this vague information, you’ll probably end up playing an extra fun round of 21 questions with your code and/or customer support. Alternatively, if you prefer to skip that guesswork, Sentry can tell you if a crash happens in the game or the native layer, like a plugin or native library you could be using.

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/x2d5plia9kn6wq20y2u2.png)

Along with native iOS and Android crash reporting, you’ll have access to session data in real-time and know how a release impacts your users with metrics like crash-free sessions, crash-free users, and the overall health of a release. New Release management features like [sorting & filtering](https://docs.sentry.io/product/releases/usage/sorting-filtering/#filtering-releases) releases and [Adoption Stages](https://docs.sentry.io/product/releases/health/#adoption-stages) give game developers all of the data to decide if the team is ready to push a new release. Did that bug-fix release work? Or are the new characters you added in the latest rev functioning and playable? You’ll know the answer to these questions and more, immediately.

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/u4gs4u98knflgzjllxa0.png)

Not everyone is playing your games at the same time, meaning traffic will likely vary and constantly fluctuate as their gameplay changes and increases. So with Sentry, developers can define [percent-based alerts](https://docs.sentry.io/product/alerts/create-alerts/issue-alert-config/#when-conditions-triggers) which adjust to changes in traffic, making sure you get notified of and effectively prioritize the most critical gamer experience issues.

#Get Started#

Install the Unity SDK via the [Unity Package Manager using a Git URL](https://docs.unity3d.com/Manual/upm-ui-giturl.html) pointing to [Sentry’s SDK](https://docs.sentry.io/platforms/unity/#install).

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/pj2a6q6dbw2hzio7ggza.png)

Unity developers can benefit from the rich context that Sentry provides by simply creating a Sentry project and pasting their DSN in Unity.

In the event players hit an unexpected issue—anything from your game failing to instantiate specific objects or simply corrupted `savegames`—Sentry will report on device type, orientation, battery level (if applicable), GPU state, CPU info, and everything about the software and OS that your game is running on. You may ask, “But what if someone is playing my game offline?” No problem—both with offline gaming and intermittent network connectivity, Sentry will phone home with these events after the connection restores.

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/dqh2x9srwgrg68ah66my.png)

If one of the best parts of your day is testing your game on nine different platforms to find where your gamers are having sub-optimal experiences—Sentry may, unfortunately, cut it short. But hey, if you still want to debug, that’s fine. Your secret is safe with me.

The number of devices your games run on is growing exponentially. Don’t collect a bunch of random devices and consoles just to recreate a single issue. Instead, use Sentry which automatically reports errors and performance issues as they happen, the platform on which they occur, and all the contexted needed to identify the root cause. Unless your player is complaing of a blurry screen when playing Rad Racer. We don’t have a boolean for `isWearing3DGlasses`.