Unity 4.3’s 2D additions are welcome. However one major missing component is tile maps. Producing 2D Zelda-like games without this feature is not an option so I’ve created an importer for what I feel is the best solution currently for editing and creating both tile sets and tile maps intuitively and quickly, Pyxel Edit.
Here is a video of what is possible with this tool:
And here is my video on how to use the importer, PETileMapper:
PETileMapper is available here.
Unity 4.3 changes have caused Admob Ads to become unclickable.
Luckily the fix is very simple and involves adding a line to you AndroidManifest.xml file (the ForwardNativeEventsToDalvik line). Here is a link to more discussion on this issue.
Here is a link to the updated AndroidManifest.xml file, obviously remember to insert your own Ad Unit ID in the correct place.
Due to a change in the way Unity handles AndroidJava classes in version 4.2, some plugin code will now raise exceptions in the editor (used to produce a warning) but work fine once deployed to an Android device.
The fix is simple, wrap each AndroidJava class call in a try…catch block, but until I get round to updating all my plugins I will post a link to the amended files below. The linked files have the try…catch blocks added.
Google Play Game Services
In-App Purchase (Android)
I’ve had a few requests for a tutorial on using the facebook graph api with my social plugin, so here it is!
My Social Unity Plugin for Android supports the Facebook Graph API. So what does that mean exactly? Well facebook expose their functionality via a rather cool but perhaps slightly confusing web interface. This interface is driven by HTTP requests and the data you get back is in the JSON format. Quickly check those links so you know what both of these are then come back here…
The Graph API is well documented and you can easily test a query by using the Graph API Explorer. So if I said you can get the current user’s profile by using a graph path of ‘me’, you can easily check this by going to the Graph API Explorer and doing this:
In my plugin you can do the same thing on the demo screen:
Or in code:
In all the above cases, the response you would get will be in JSON, similar to:
"name": "Fred Bloggs",
"name": "London, United Kingdom"
So how do we extract all that information out in C# within Unity? Well the latest version of my plugin includes ‘LitJSON‘ which is remarkably good at doing this, for example if the above JSON was in a string variable ‘response’, you could get the user’s last name by:
JsonData jdata = JsonMapper.ToObject(response);
lastname = (string)jdata["last_name"];
Nice and simple! In my plugin, all responses from a GenericRequest come back via the gameobject ‘UnityGameObjectReceiver’, and you need a script attached to this gameobject that has a ‘OnRequestResponse’ method (see the demo for an example).
Part Two of this tutorial will cover more complex queries…
A new version of my AdMob Ad Plugin for Android is now available (v1.01).
New in this version:
Google Admob SDK 6.1.0 now supported
Multiple ad banner types supported (including smart banners)
Hide on start added
If you have already purchased the plugin and wish to receive the new version send me an email with your original order details and I will send you the new version.
Yes, I’m afraid the time for free stuff is over, however to soften the blow, all my Unity plugins will be half price for the next couple of days! Get them here in the Unity plugins store.