Implement Leap Motion Controller for gesture handling

I would create a pointer to a Controller and initialise it in your constructor, you can do this in the plugin class if you’re implementing one or else have a singleton class. I did this in my Leap blueprint plugin before the official implementation was available and it worked without issues.

//in class declaration as private member variable
Leap::Controller* Controller;

//In class constructor
//LeapListener was a custom class inheriting from Leap::Listener    
Listener = new LeapListener(); 
Controller = new Leap::Controller(*Listener);

You could use OnRegister() instead of the class constructor. Just make sure you call Super::OnRegister() in your overriden body as well.