Pyxel Edit Tile Map Importer for Unity- PETileMapper

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! Important Admob issues!

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.

Unity 4.2 Changes!

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

GPGSUnityPlugin.cs

Admob Plugin

AdMobUnityPlugin.cs

In-App Purchase (Android)

AndroidPurchases.cs

The Facebook Graph API Part 1

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:

FacebookUnityPlugin.GenericRequest("me","","GET","");

In all the above cases, the response you would get will be in JSON, similar to:

{
  "id": "1234565", 
  "name": "Fred Bloggs", 
  "first_name": "Fred", 
  "last_name": "Bloggs", 
  "location": {
    "id": "111112222", 
    "name": "London, United Kingdom"
  }, 
  "gender": "male", 
  "timezone": 0, 
  "locale": "en_GB", 
  "verified": true, 
  "updated_time": "2012-07-24T09:52:15+0000"
}

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…

Version 1.01 of my Unity AdMob Ad Plugin for Android Released

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.