Unityから、native iOS/AndroidコードにdispatchEvent的な

https://github.com/asus4/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);