Unity Event Listener Plugin

by asus4
+

Simple event from unity to native code for iOS and Android.

( Updated a minute ago )

UnityEventListenerPlugin

HOW TO USE

Unity

NativeEventDispatcher.DispatchEevnt ("UNITY_TEST_"+Time.frameCount);

iOS

[[NSNotificationCenter defaultCenter] addObserver:self
                                         selector:@selector(hoge:)
                                             name:@"UnityEvent"
                                           object:nil];

Android

interface UnityEventListener {
  void onUnityEvent(string event);
}

UnityEventPlugin.addListener(listener);
UnityEventPlugin.removeListener(listener);