Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Listening for events in unity from native ios plugin

Discussion in 'iOS and tvOS' started by Superflat, Aug 26, 2016.

  1. Superflat

    Superflat

    Joined:
    Mar 19, 2009
    Posts:
    354
    Hello,

    This is my very first time writing an iOS plugin that should enable bluetooth on iOS and advertise data using BLE. Most of that i have covered but i havent quite figured out how to listen for events happening on a native level.

    Do I pass a callback along to the native function?
     
  2. r618

    r618

    Joined:
    Jan 19, 2009
    Posts:
    1,302
    you can marshall a pointer back and forth, or you can use UnitySendMessage from the plugin
     
  3. Superflat

    Superflat

    Joined:
    Mar 19, 2009
    Posts:
    354
    Is there a more definitive guide? Unity docs are rather lack luster on the topic.
     
  4. r618

    r618

    Joined:
    Jan 19, 2009
    Posts:
    1,302