fuziki / UnityCoreBluetooth

Unity Bluetooth Plugin for iOS & macOS Editor
MIT License
52 stars 13 forks source link

Added UnityCBPeripheral in the OnUpdateValue handler #20

Closed Daniel-BD closed 3 years ago

Daniel-BD commented 3 years ago

This makes it possible to know which UnityCBPeripheral the value is coming from if there are multiple peripherals connected at the same time.

PS. I'm not sure why git thinks I've changed the first 7 lines and last 2 of UnityCoreBluetooth.cs. I didn't change anything in those lines on purpose, perhaps the IDE did something...

Daniel-BD commented 3 years ago

I haven't worked with Unity or contributed to others' repos that much before, so some things may not be perfect here.

I found your plugin, but needed to add this functionality for my use case, so I did and it worked! I guess you would have to rebuild the Xcode project for the changes to work right? I have rebuilt the Xcode projects according to the instructions in your blog post and it worked for me.