Vivek Mishra
Vivek Mishra

Reputation: 5705

LeapMotion new sdk missing classes from older SDK for Unity

I am developing an app using leap motion and Unity 5.6. Earlier I was using LeapMotion 3.0 SDK which was working properly in my app but had few issues which I read somewhere are fixed in the newer SDK. So I tried implementing newer sdk version i.e 3.2.1 in my project.

I am successful in integrating SDK but there are certain classes that I was using from previous leap motion SDK but those are not present in the newer SDK version provided by leap motion, which are causing compilation error in my application.

I have searched all the unity API docs provided by Leap Motion but haven't found description on how to replace those missing classes using newer SDK.

Few classes/references that I am missing in newer SDK are:

  1. InteractionBehaviourBase
  2. HandCollisionCallbacks
  3. Physical Button

I haven't found alternative classes/references for the above classes.

Upvotes: 0

Views: 215

Answers (1)

vab
vab

Reputation: 177

You're describing classes from the beta version of the Interaction Engine. The Interaction Engine is now out-of-beta, but didn't maintain total backwards-compatibility with projects that used the beta version.

The analogous classes you're looking for would be:

  1. InteractionBehaviourBase -> InteractionBehaviour. The main class to refer to interactive objects is no longer InteractionBehaviourBase; it's just InteractionBehaviour.

  2. HandCollisionCallbacks: This class has been removed in favor of callbacks that are accessible through InteractionBehaviours themselves. Here's the API documentation for InteractionBehaviours.

  3. PhysicalButton: Actually, I can't find any reference to a class with this name in Leap Motion's Unity SDK. But the new Interaction Engine provides example scenes that demonstrate how to use the new InteractionButton class that provides physically-simulated buttons suitable for user interfaces. Check out Example 2, "Basic UI."

For a general reference, you can find more helpful information on the new Interaction Engine via the documentation wiki.

Upvotes: 1

Related Questions