Archive for the ‘Tips & Tricks’ Category

Unity iPhone App Store Submissions – Problem Solved

Recently some Unity customers who have been very anxious to get their game approved by Apple for listing in the app store have received a disappointing rejection notice by Apple because they use something that was not approved by the Apple rules.
As it turns out, the Unity iPhone application was accessing those non-public functions through the Mono runtime which is a third party piece of code we use. Therefore, some of our customers had the bad experience of seeing their application be rejected.
We have been working on hard on this issue as it stalls and affects our iPhone developer customers. We were able to correct the issue just 2 days after we first heard about it and delivered that fix to those that had reported the problem. Many of them have already resubmitted their application to Apple.
We will be releasing this new version, Unity iPhone 1.5.1, sometime next week. In the meantime, you have a need or concern, please contact support@unity3d.com and request an iPhone build with this issue fixed.
Note that Unity games already on the app store are not affected by this.

Recently, some Unity customers who have been very anxious to get their iPhone game approved by Apple, have received a rejection notice because they use something that was no longer approved by the Apple rules.

We have been working hard on this issue as it stalls and affects our iPhone developer customers. We were able to correct the issue 2 days after we first heard about it and delivered that fix to those who had reported the problem. Many of them have been already resubmitted their application to Apple. The first Unity game to completely pass the App Store Submission Process is “Star Wars: Trench Run”.

We will be releasing this new version, Unity iPhone 1.5.1, publicly on our website sometime next week. In the meantime, if you have an urgent need or concern, please contact oleg@unity3d.com and request an iPhone build with this issue fixed.

Note that Unity games already on the app store are not affected by this.

For those who are interested here are the technical details:

The reason why Unity authored games (amongst other applications) have been rejected is that Apple recently has begun using special tools to check against usage of private APIs. The main reason for restricting private API usage is to avoid problems with applications breaking when Apple releases new versions of the iPhone OS. Unity iPhone 1.5.0 is accessing 2 private functions _NSGetEnviron and exc_server from the .NET runtime Mono.
There has been a lot of confusion about this topic recently. So to be 100% clear, there is zero relation between those 2 private functions and harvesting user information. Harvesting of user information can be done with a public API. The 2 private functions used in Unity, can not be used for this purpose. Neither do we know of any Unity games that performed any kind of harvesting of user information like phone numbers.
So why did we access those 2 private functions? First of all, Mono runtime was ported from OS X where those functions are very commonly used. Actually they have been used for years now. And as those functions didn’t give us any problems during Unity port to the iPhone, we simply continued to use them.

What do those functions actually do?

_NSGetEnviron is used by the Mono runtime to provide an implementation of the .NET core API method: Environment.GetEnvironmentVariable(). On UNIX environment variables are often used to pass arguments to applications. Due to how the function is exposed, it does not let developers do any data collection.

exc_server is used by the Mono runtime to provide graceful NULL reference exception handling. This is useful for developers, when they dereference a null pointer, we can avoid a crash and instead throw an exception and continue the game.

While those functions are useful for debugging purposes, Apple now rejects Apps that use them.

In order for us to solve this problem we simply removed any calls to _NSGetEnviron and exc_server. Update Unity iPhone 1.5.1 was sent out to developers days ago. Most of them have already resubmitted their Apps to the AppStore with the functions removed. Unity iPhone 1.5.1 will go live this week. The first Unity game to completely pass the App Store Submission Process is “Star Wars: Trench Run”.

Unity Game Development Essentials

IMG_0091

By now many folks are aware of the fact that Will Goldstone has written a book about Unity, it’s called Unity Game Development Essentials and it’s being published by Packt Publishing. Early on Will and his publisher graciously shared PDF copies with folks, including everyone on the Unity Community Forums. While it was extremely exciting to know that a book was in the works, then available in electronic form, I have to admit that the best moment of all came today when a brown box was delivered to my desk for me to open. I’m the guy that handles incoming mail and packages sent to the San Francisco office so it wasn’t unusual for me to have a “present” to open today. When I cracked open the box I found a nice surprise inside, the three copies of Will’s book I’d long ago ordered had finally arrived!

So for those that don’t know about it, consider this your heads up to check it out! It’s a book geared towards the beginner end of the spectrum and from what I’ve read so far (a fair chunk of the PDF already) he did an excellent job of laying things out for those of you just getting into Unity. If you’re interested give it a look on either the Packt Publishing site or over on Amazon.com:

Unity Game Development Essentials (Packt Publishing)
Unity Game Development Essentials (Amazon.com)

Kudos, and a huge thanks, to Will Goldstone for the effort, I know he put a lot of blood, sweat and tears into this book and it shows. Well done Will!

Building Buzz for Your Game

We see new games being made with Unity at an ever increasing rate. A lot of them get picked up by the gaming media thanks to the sprawling creativity of our users – others don’t get noticed as much as they deserve.

Unity makes game development accessible to a broad audience, but creating awesome games is not always enough in itself. Luckily, there’s lots of articles and blog posts about how to get games noticed. We have linked to some of the best in this blog post.

One important point raised in several of the articles is that building buzz and making sure your game gets noticed is something you should start doing long before your game is released. So if you’re thinking “Well before I think of spreading awareness I first need to actually make my game LOL”, well, then you’re probably mistaken.

Go on, read on!

Read the rest of this entry »

“Touch Phases” Example iPhone Project

I decided to clean up the Touch Phases project I had from a while back and post it to our iPhone example projects. You can now record and play back touch input in either the editor or on the device. Even before adding recording/playback, I used this project as a debugging tool when building the Penelope demo/tutorial. I hope that it will help as you develop your own iPhone apps. Here’s a short video of the recording/playback support:

Snow Leopard’s 64-bit Safari and Unity

So, most of you have probably heard the news: Apple is going to release Mac OS X 10.6 “Snow Leopard” this Friday. This release will give Mac users plenty of new feature goodness and new technologies to play with, and brings a lot of changes under the hood. Unfortunately, I must inform you that one of these changes may cause some grief for Unity users, at least for the time being:

Read the rest of this entry »

Just Looking Around

Just making characters in your game look around can bring them much more to life as well as express important information to the user. Here we’ll discuss a few use cases and present a script that makes it simple to implement in your game.

First a tech demo video to set the context:

Read the rest of this entry »

Focus: The Locomotion System

The Locomotion System for Unity has previously been briefly mentioned on this blog, but this post will go more in depth with what exactly it can do to bring more life to your animated characters.

The Locomotion System is all about making walking and running in games look better and more believable without requiring dozens of animations. The system automatically blends your keyframed or motion-captured walk and run cycles and then adjusts the movements of the bones in the legs to ensure that the feet step correctly on the ground. The Locomotion System is available for free when used in a Unity game.

Video Introduction

The best way to understand what the Locomotion System is all about is by watching a short introduction to it:
Read the rest of this entry »

Bug Reporting and You

Assuring quality is a tricky task, and involves a lot of people — testers, developers, and even you the users! There are thousands of you and only a few of us, so today I want to talk to you about this:

Unity Bug Reporter

If you see this Bug Reporter appear, odds are that you’ve just experienced a problem in Unity. I can honestly say that whatever it is, we want to fix it. As part of our QA processes, the test team (currently: me, Jens, Caitlyn, Rasmus, and Oleg) constantly review “the queue” of publicly submitted bugs in our QA/support database. We can do more with some bugs and less with others, and I want to help everyone understand how to tell us about their problem so we can actually fix it.  When we review bugs, here’s what we think about:

What happened to this user and how did it happen?

Can I force Unity to do it again for me?

If we can answer both of these questions then we have enough information to investigate the issue and communicate our findings to you the user, or to a developer when discussing a fix for the issue. For this reason, the information you write in details 1) and 2) in the bug report is critical in helping us squash the bug forever.

Now, if we can’t understand what happened in the first place then there isn’t much we can do about the problem. So under detail 1) we ask that you thoroughly and completely describe the problem, using as much detail as you possibly can. The worst thing you can do here is write nothing. Writing anything you think is relevant to the problem is always better than writing nothing.

Once we understand the issue, we want to reproduce it. When we try to reproduce it, we perform a series of actions or “repro steps” to make the bug occur again. The first place we look for help determining the right set of repro steps is under detail 2). If the bug you’re reporting is frequently or consistently occurring, the best thing you can do is describe a discreet series of steps that we can take in order to reproduce the bug.

Sometimes a bug is specific to the scripts or assets in your project folder.  In case it is, we ask that you always attach your project folder so we can make our test environment match your development environment as closely as possible. The bug reporter will automatically zip your folder and upload it, even if it’s as large as 500MB. And don’t worry, your project will only be used for testing purposes and it will never be shared outside of the Unity Tech office. If you can isolate the problem down to an extremely simple project folder that contains only the assets and objects relevant to the bug, even better!  Either way, providing a project folder will greatly increase the likelihood that we can successfully reproduce the bug and fix it. But I’ll reiterate: if we cannot reproduce the bug, we cannot fix the bug.  So pretty please with sugar on top, attach your project folder because we hate not fixing bugs.

I hope this has been an insightful look into our QA processes and you understand a bit more about the purpose of the bug reporter. To learn even more about bug reporting and the Unity QA processes, please watch the “How to Get Your Bugs Fixed” presentation video from Unite ‘08.

Resources everyone should see

Platform TutorialI think there are a lot of resources that are important but people might not have seen or skipped over it. So I am putting up a list of the most overlooked but important resources.

Getting started
The best way to get started if you know nothing about Unity is to go through the 3D Platform Tutorial. With this in-depth tutorial you can learn how to make a 3rd person platform game in Unity, but at the same time you will learn all the basics of Unity that will give you a head start when creating your own game.

Unity Locomotion system
If you are doing a lot of character animation in your game, you must check this out. Rune’s Locomotion system was presented at GDC 2009 in a fully packed session. The great thing about it is that it does stylized IK, meaning that it uses the existing animations to do good looking motions and only minimally adjusts them to place feet on the ground etc. It also scales really well, you can start out with a simple walk cycle and it will automatically synthesize sidestep / run / backwards animations for you. If you provide more animations the animations will simply look better.

Get the project folder here

Watch the Unite 2008 talk here.

Visual Studio Integration
In our roadmap we announced Visual Studio integration for Unity 2.6. However you can already use Unity with Visual Studio very well. Lucas Meijer has a blog post on how to create Visual Studio projects from a Unity Project folder automatically here.

Shaders
Amir’s Unite 2008 Shader talk is the defacto best tutorial on building shaders. He reshot the session into a 2 hour talk so he could go through all the details.

Customizing the asset pipeline
Lucas is really into tightly controlling the asset pipeline and automating every single bit. Fortunately Unity is very extendable, so he has a lot of places where he can plug in. Watch the talk here.

Matthew’s Physics Talk at Unite 2008
I generally love hearing Matthew’s talks. Got to love the pictures. This year on car physics was very useful.

Unity GUI
Nich’s Unite 2007 talk on how to create your own GUI controls is still very relevant.

The wizkid Forest talks about particles
Forest Johnson, a (then) 15 year old kid single handedly programmed the Avert Fate demo, he did some awesome particle effects too and then gave a kickass impromptu particle talk at Unite 2007.

Rune on dynamic walking

Rune on dynamic walking

Amir on shaders

Amir on shaders

Lucas on pipeline

Lucas on pipeline

Matthew on physics

Matthew on physics

Forest on particles

Nich on Unity GUI

Forest on particles

Forest on particles

Blogs about Unity:
The Flashbang guys have an awesome blog about Unity, that contains deep technical information that sometimes even I didn’t know about.

Lucas has a great blog about Unity with a lot of very useful information.

Somebody made  a site collecting video tutorials about Unity.

Hardware of the casual gamer, launched

Almost a month ago I said we’re preparing reports of Unity Web Player hardware statistics.

Well, here they are: unity3d.com/webplayer/hwstats

Operating system versions, desktop resolutions, graphics driver versions, shader models, memory sizes and some more. All broken down by quarter so some sort of “trends” can be seen (sure, changes can be caused by general hardware change or simply different people groups playing different games).

Enjoy!