Tag: Unity Debug Diaries

Unity Debug Diaries

Unity Debug Diaries: Unity & Apple TV

So I have been doing some initial tests using the Apple TV and so far so good. If you have gotten into the Unity Apple TV beta then you know the score by now. The current beta program has a modified version of Unity 5.1 that includes Apple TV as an iOS device in your build settings. If you want into the beta program, contact your local Unity rep and see what they can do. To get in we had to actually bug David Helgason, so I am not saying it will be easy but there is something really cool about having your stuff up on your big screen.

Right, now for the lowdown. I had 2 major problems, input and plugins. To get my initial build to work I had to strip out all my plugins… everything that had a call to external iOS functionality, even the ones built into Unity. Don’t worry about your internal plugins, things that exist with in the engine and player, they should be fine. tvOS support. So your first step in getting a build running on your Apple TV would be to

Update all your iOS plugins.
Systematically make builds and test on device, ripping out each plug-in until it works. If you read the XCode error message it will always point you to the offender.

Once you build successfully, its time to deal with your input. Unity has allowed for two main ways of dealing with input. 1) You can treat the remote like a game pad or 2) You can use the touch input…




Unity Debug Diaries

Unity Debug Diaries: Mip Map Memory Reduction

First off, I must apologize for the weird tense swapping that happens in these articles. I write stuff as it happens and do not want to do too much editing lest these become too tedious to write and then I just stop completely. So if you can deal, I will continue to write 🙂

Today, I am attacking using Mip Maps on UI for multi-resolution rendering. Enabling Mip Maps and managing which of the maps are loaded into memory is the easiest way to handle texture memory on lower end devices. Now, I believed this but did not see the reduction in the profiler on device. So then I figured it was a fallacy because the data suggested otherwise. I then switched to TK2D to handle a lot of my multi sized sprites but the lack of clarity on the issue always bugged me. So now, I want to find out for sure. I cant get a straight answer out of anyone so its time to set up some tests.

First, I am going to make a separate project in iOS to have a clean environment and have nothing muddy my results. I am choosing iOS because its got its own set of profiling tools that will help me isolate if the Unity Profiler is telling porky pies (lies).
Results: Lies lies lies! So profiling in iOS showed a radical drop in memory based on the appropriate quality settings. I have four 2048×2048 at 32 bit. The results in the profiler are:

Full resolution: 107.66mb
Half resolution: 43.68mb
Quater resolution: 27.69mb

These results…




Unity Debug Diaries

Unity Debug Diaries: Radically long load time on Kindle Fire HD

One of the most useful things in day to day game development is to know about those weird gotchas that you find in any complex tech. On top of that, you need to remember said gotchas the next time you encounter them. When developing cross platform games at a fast pace, I have solved problems and completely forgotten the solve the next time I bump into it six months later. Debug Diaries is my first attempt at trying to curb this. When I am faced with a weird problem, I am going to try to fix the problem while writing about it so that I can remember and hopefully, help you too. Here goes…

On doing the Amazon port of our soon to be released game, Thunder Jack’s Log Runner, I found that after adding the plugins to the port, the game too about 5 to 10 mins to load. I have seen this before when loading a lot of textures from resources but can be sure. The last thing I added before the problem was AdColony, which could have pushed me over the memory threshold. Time to pull it out and add some debug logs.

The first thing I did was to switch from my amazon branch to my google play branch to see if the problem was inherent or platform specific. For those who don’t know, most Android builds will work on Amazon devices because they are Android. You just have to watch out for the platform specific plugins.
Result: Same thing. So now, I am…