Welcome Guest,Register Now
Log In

ANT Forum

Welcome guest, please Login or Register

You are here: Forum Home → ANT+ Forums → ANT+ Heart Rate Monitor → Thread

   

ANT+ In Unity & Crossplatform

Rank

Total Posts: 2

Joined 2014-10-13

PM

We've had ANT+ HeartRate integrated into our Unity game for a while. We accomplished this by bringing in the AntPlutManaged library's raw C# code into our project and the three .dll's it required. The raw C# code only required minor modification to help it locate it's .dll's in Unity's slightly unusual file structure. Still, with those slight modifications (that were actually an answer from another topic on this forums) we've had ant+ working near flawlessly for a few months now.

Today, however, we hit a snag I was hoping to get some insight in. You see, Unity3D is a cross-platform game engine, and we're beginning to do the necessary work to get our game working on Mac OSX. For the Ant+ side of things, that means making use of the Mac library. But, when we cracked open the Mac library today, we saw that it doesn't seem to have a any sort of wrapped and/or managed library. Thus, we find ourselves in a bit of a pickle.

Is there anyway we can hook up the C# Ant+ Managed Libraries to the Mac Ant+ package, or do we have to build that part of our code base from the ground up?      
RankRankRank

Total Posts: 91

Joined 2012-10-12

PM

We haven't tried to use the library in that way yet. It should be a matter of creating a Mac variation of the UnmanagedWrapper that constructs the appropriate serial object and changing the DllImports to reference it.      
Rank

Total Posts: 2

Joined 2014-10-13

PM

Since I pulled the C# code into Unity, I know how to set in engine the conditional compilation to cycle the DLLImport references per platform, but I feel I would be way out of my depth creating a Mac variation of the UnmanagedWrapper. Is this something that ANT would be willing/capable of releasing? If so, how long would such a thing take?      
RankRankRank

Total Posts: 91

Joined 2012-10-12

PM

Hi Jesse,

There hasn't been demand for a managed Mac library till now, there is nothing in the roadmap.      
Rank

Total Posts: 4

Joined 2018-10-13

PM

JesseBusch - 27 January 2015 05:01 PM
Since I pulled the C# code into Unity, I know how to set in engine the conditional compilation to cycle the DLLImport references per platform, but I feel I would be way out of my depth creating a Mac variation of the UnmanagedWrapper. Is this something that ANT would be willing/capable of releasing? If so, how long would such a thing take?


Hi,JesseBusch
I have some trouble in integrating ant+ with unity.
https://www.thisisant.com/forum/viewthread/7149/
How did you do it?

You say that "The raw C# code only required minor modification to help it locate it's .dll's in Unity's slightly unusual file structure. ", how did you do it?