Skip to main content

Posts

Showing posts from November, 2013

Unity Plugin Android(Part2)

In my last post iv'e covered about how to write a plugin without actually over-riding the unity activities so you can peacefully co-exist with other unity plugins (for android). The reality is that you will have to deal with people using Prime31 as one of their plugins. This can be a problem if you need to get callbacks for the android system event callbacks like: void onCreate(Bundle Intent){ } void onStart(){ } void onStop(){ } and so on. You get the idea. Fortunately the prime31 guys provide us a method for registering a class to get callbacks from these methods on the activity. The details of which are provided at the following url https://gist.github.com/prime31/0908e6100d7e228f1add/raw/a5d96177c8d8fde548068d2a15de49acdb2023ec/Android+Activity+Sharing This is pretty straight forward If you know how to use Android ADT/Eclipse for creating android projects. Here is how you go about it. 1) First create an Android Project. Mark it as a library project. 2) Add