Is your Unity project using UnityAds? Did you just update to Unity 5? Are you now seeing an error when trying to build for Android? The read on…
Unity 5 now includes in-built support for UnityAds, without requiring the UnityAds plugin from the Asset Store. As such, if you’ve previously imported the plugin, Unity might complain. It may simply be fixable by choosing Assets > Reimport All (which might make Unity realise it should ‘ignore imported version’ of UnityAds).
But, if that doesn’t work, you’ll probably see something like the following console output when trying to build an Android APK:
already added: Lcom/unity3d/ads/android/BuildConfig;
java.lang.IllegalArgumentException: already added: Lcom/unity3d/ads/android/BuildConfig;
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
If you’re seeing this, it simply means you’re project is still trying to include both the in-built and imported versions of the UnityAds plugin. To fix it, follow these steps:
- Close Unity Editor
- Backup your project
- Remove any folder or meta file called UnityAds from your project’s Assets/Libs folder
- Remove any folder or meta file called UnityAds from your project’s Assets/Plugins/Android folder
- Start Unity
- Build your project for Android
If this doesn’t work, try doing an Assets > Reimport All, then building again. Hopefully, future version of Unity will solve this problem automatically. Good luck out there!
Mobile devices are becoming more and more powerful. However, not all your users will have high-end mobile devices, so you should keep a low-powered device handy for testing the performance of your games. If you follow the usual advice for mobile devices (use low-poly models, minimal lights, few effects and static objects where possible) you’ll be OK on most devices, but you may be caught out on some devices – resulting in annoyed users. Here are a few tricks to try if you still need to improve the performance of your Unity game. Continue reading Boosting Unity performance on mobile devices
While developing a game, I wanted to enable characters to “see” where they’re going; that is, to tell them what they’re about to stumble into, without using colliders. The answer was to cast a Ray, angled slightly downward, in front of the character, so he can “see” if he’s about to walk into a tree, or a river, before it happens. Continue reading Unity – How to make things see where they’re going
A very powerful feature in the Unity Editor is the Blend Tree. This is an extension to an Animation Controller, which allows you to blend the joint movements of multiple animations and control the ratio of blending one or more with parameters.
Continue reading Unity – Animation Blend Trees
There are several AI steering libraries available for Unity, but I settled on UnitySteer due its similarity to OpenSteer in C++. Continue reading Getting started with UnitySteer
I knocked up a quick demo to show how you might create a Unity game, which uses either keyboard input, or the accelerometer of a mobile device, without having to change any code, include any third party libraries, or use conditional compilation. Continue reading Unity – automatically choosing key or accelerometer input
The more I play with Unity, the more it feels like the workflow of Flash Pro, whereby you attach scripts to instances of actors on the stage.
I’m not talking about the ‘pure code’ approach that all ActionScripters have become used to now; but the decentralised collection of independent scripts associated with timeline movieclip instances (behaviours, if you will).
For those who have played with any of the above and want a good tutorial to get stuck right into games development with Unity, this (intermediate level) tutorial is great.
I’ve been playing around with the Unity game engine and keep having flashbacks to a little know 3-D game dev tool I used over 10 years ago – called Virtools.
Most people will not have heard of Virtools, which itself was called NemoCreation in a previous life, until legal problems forced them to go away and rebrand. It was way ahead of its time, supporting real-time ray-tracing, hardware acceleration, full Havok physics an easy to integrate multi-player solution, long before the more popular Shockwave 3D and WildTangent had anything close.
The workflow was very similar to Unity and I had originally pinned a lot of hope on it. But, the platform was too restrictive, provided no sensible scripting alternatives and was prohibitively expensive to license. Getting hold of a trial license was notoriously difficult, too. So there were simply not enough people creating worthwhile content for it.
The licensing fubar and possibly the fact that it was way ahead of its time, were probably its death knell. But I tip my hat to what could have been.