Tag: Unity

Connecting the Unity Profiler to your iOS Device

While doing some contract work recently I found that the Unity Profiler no longer reports accurate texture memory figures for mobile while you are in editor. Maybe it never did but I swear it did an some point. Rest assured, all the texture compression settings are still fine, you just have to test on device now. I had never done this with the latest release of Unity and remembered the days where I wished I could. So I gave it a bash and it is dope! Here are the steps you follow:

Make sure your mobile device is on the wifi network. The profiler uses a network connection to send data back to Unity.
Make sure you have “Development Build” and “Auto Connect Profiler” check to on in the build settings (handy shortcut for the build menu, Command + Shift + B)

Build for XCode. Make sure you are using a profile that allows you to be running the XCode debugger, so not an enterprise profile.
When the game launches, grab the IP address that appears in the XCode debug console. It will have a port number so make sure to get that as well.

In Unity, in the profiler, click on the “Active Profiler” button in the bar at the top. Sometimes it picks it up automatically, but if not, dump in…




Unity & MonoDevelop 4 Woes

Unity usually always brings it to the table with their updates but sometimes they miss a few things. The MonoDevelop 4 is shiny but has one serious problem with the basics, at least on OSX. This is code folding! At first, code folding looks great. I do like the ability to fold “if” statements,¬†but after I update something, all hell breaks loose and I can’t fold anything anymore. My workflow relies on folding to help me navigate code (as I think it is so with a lot of other devs). So here are some steps to get back to the old version of Mono. I am on OSX Mavericks, on a mac book pro BTW. I am not sure if yall PC people have the same issue, but then you are probably using VS.

Dual Install Unity
Most people don’t know, but you can have multiple versions of unity on your machine. First, uninstall all your Unity instances. Next, do an install of Unity 4.2.2 (anything that is before 4.3). Once you have done this, rename your unity folder. I just rename it to “Unity 4.2.2”. Now install teh latest version of unity. So now, you have both versions of unity installed on your machine. The folders are “Unity” for the current and “Unity 4.2.2” for 4.2. Make sure update your shortcuts in your dock.
Link To The Old Mono
In the current install of Unity, open the Unity preferences and go to External Tools (Unity->Preferences->External Tools ). There, select “External Script Editor” and “Browse…” to open…




Collective Mass Radio #2




Collective Mass Radio #1




Unity Text

Unity Text Solutions

So we all know that text in Unity used to be a right pain in the rear. At least doing it without a gazillion draw calls using OnGUI. Things have changed slightly with all the current 2D solutions and Unity’s text mesh but I feel like each one fails at something, even be it a small thing. Through investigating a “read to me” system for my wife’s new game, Notespace¬†Beat, I have taken a good hard look at some of the best solutions out there and am giving you a quick run down. Before we get into it, I had a very specific set of text requirements that I needed to satisfy. I need to be able to change size easily, change the style of the font (bold, italic), change the line spacing and pretty much everything you can do with in a text area in photoshop. It needs to be light and I need to get to the positional data of the text so I can find out if a user tapped a word.

First up, Unity Text Mesh.
I have never really played with Text Mesh before this project because I was always under the assumption that it would not work with my current work flow and 2D solutions. I was wrong about that and there are a lot of things to write home about here. First off, the dynamic font generation is pretty dope. Not having to make new font maps every time I change my font or its…




Lists and Linq in Unity, do it!

I have been using C# for many years now in game dev and I love it. Most hardcore C++ guys have always given me grief but I still think the language is beautiful! Yes yes, its memory managed but thats a whole beast unto its self. At least I don’t have to spend a week looking for an illusive overwrite or leak. But each unto their own, we all make games and in todays world, fast to market is a big deal, especially with little to no budget.

One of the great things in C# is Lists. For those of you who don’t know them, they are basically dynamic arrays with a whole host of special functions. They are wonderful things, especially for inventory systems. There is a lot of debate about if they are significantly slower than arrays but the general rule is don’t add to them in a critical update loop. Besides being able to add and remove items dynamically, you can also just bake the list to an array using ToArray(). This way you can have a list that you use to manage your stack and once you are done, you can just bake it out.

So what I want to chat about here is Linq, which is C#’s look up language for lists. I always stayed away from it, erring and my years for “Doing things the right way” but Linq used in the right way can save you a lot of time. I have started using it for my data structure look…