If you have to migrate a complex Unity 3.x project to version 4 there is more than the SetActive change. See the list of issues I have found and their workarounds. Some of them are specific to iOS, some others are more general in Unity 4 (4.3.4f).
This video gives a quick overview of Animator Access Generator, a C# code generator that makes handling of Animator states and parameters easier:
- You don't have to enter state or parameter names manually any longer as they will be generated automatically.
- Register event handlers on state changes or transitions that met predefined conditions.
- Using it will let the compiler detect most possible problems in your code, saving you time consuming bug analysis because of wrong hash IDs.
If your Game Center enabled app starts the very first time, you have to decide how to handle those situations when the user don't want to connect to Game Center. A call to GameCenterBinding.authenticateLocalPlayer () triggers 3 login requests even if the user pressed Cancel. Here is my workaroung for this using a message box first.
I ran into a strange problem under Unity iOS: The generated Xcode project often but not always reported a corrupted Info.plist. And of course Info.plist was not readable at all. Here is what I found out.
I did some clean up on our web site these days and one of the most critical parts was the CSS stylesheet I added years ago. All the time it was included by a customised index.php and every update forced me to patch the original file - of course a pretty dirty way. There is a better way and I post my documentation of changes.
I just updated to iOS 7 and ran into some small problems. So here is what I found out about how to get my Unity project to work with iOS 7 and XCode 5. I still stick to version 3.5.7 but most issues apply to 4.x as well.
In part (1) and part (2) I discussed the concept and some implementation details for BundleVersionChecker a set of editor classes to provide access to Unity's PlayerSettings.bundleVersion (and bundleIdentifier) at runtime and an enhanced way of managing the history of versions to provide migration steps as necessary - at least since you have installed it. Now I show you how to use it in your project.
In part 1 I introduced a solution how to get access to Unity's PlayerSettings.bundleVersion at runtime. Now I want to improve the editor classes to get a smoother workflow and add some version tracking.
BundleVersionChecker is a set of Unity editor classes to get access to Unity's PlayerSettings.bundleVersion and their history at runtime. This first article series in 3 parts describes the problem how it started (part 1). (Part 2) shows the concept of the more sophisticated version with tracking the history of bundle versions. The usage in (Part 3) is likely what most people are looking for.
I just spent endless hours in the last few days to find a very annoying performance bug in my iOS Unity project. I observed a continuous performance decrease from minute to minute when running the game in loop mode for testing. After about 10-20 minutes it was no fun anymore to play. The strange thing is: The effect occurs especially when the device is lying still on the table. When I move the device, frame rate rises noticeably but decreases again when there is no movement.
Just a short note on how to enable zooming in and out with your Apple magic mouse in Blender 2.6.7. After I updated to the newest version mouse scrolling in UV editor results in Pan View, definitely not what I prefer. Maybe this is because I defined Ctrl + mouse wheel system wide for zooming the screen.
After wasting a lot of time when flipping Blender animations made for left side to the right and vice versa, I decided to write an add-on doing it automatically. Have you ever been annoyed about copy & paste X-flipped pose frame by frame? See the video tutorial below how to solve this problem in your project.
Blender allows you to copy poses and paste them as X-flipped Pose within one frame provided your bone names conform to the naming convention. This is nice but when animating a run cycle and you have set up the first half of it, you don't want to copy and paste frame by frame.
Doing game development for mobile devices often leads to situations where you feel like programming in the 1990s again. Unacceptable drops in frame rate, low memory warnings and other performance hassle could be very painful and cost you days and weeks.
So I am going to describe the basic techniques for performance analysis and how to use the profilers for Unity3D pro on iOS including some hints how to tweak them. A sample case detecting spontaneous frame rate drops is given at the end.
I just came across the problem of handling disabling and reenabling the idle timer within an iPhone app. In RRRunner as pure motion input based game there are longer intervals without touch input activity. So the system might turn off the screen during the game. Here is a small piece of code how to manage this.
I was curious about the impact of several Mathf functions when running an app on iPhone. So I decided to make some measurements on iPhone 5 and iPhone 4. Here are the results.
There are a couple of resources out there describing how to set up basically Unity3D with Subversion. In this posting I describe the special situation when developing for iPhone i.e. which XCode specific files should be under version control, how to have different versions in parallel and how to get off cheaply on major Unity3D version updates.
Although I found plenty of information and really awesome tutorials about rigging, skinning and animation, I ran into some problems on the way to my first animation. So in this posting I list all my problems and the solutions / workarounds I found for them.
Using Unity's ragdoll wizard leads to the problem that the prefab connection to the character model is broken. That means after a change of the model in your 3D software yo have to perform the whole procedure again. To avoid this I wrote an open source code generator that saves all ragdoll components in a C# factory class which you can invoke at runtime.
OK we've got the excellent Subversion docs and man bash and if you are the bash guru and Subversion expert, you know very well how to combine these to get every job done. All others struggling with whatever is beyond cd and ls in terminal app but don't want to pay for SmartSVN or whatever will get some tips and tricks. Focus of this article is not the 500th description of the most important commands from both worlds. Instead I am going to show you how to quickly improve your day to day tasks without having to know too much about the background.