Search code examples
c#unity-game-enginekinectkinect-sdk

Using Kinect gesture detection


I am trying to use gesture detection in my Unity application but I cannot get it to compile. I have trouble instantiating a VisualGestureBuilderFrameSource object.

My investigation has led me to the following posts :

How to use a Visual Gesture Builder database with Unity3D Plugin?

https://social.msdn.microsoft.com/Forums/en-US/42a4059a-e8b4-4ffd-87e7-757e19dcd7ca/how-to-load-a-vgb-database-with-unity-plugin?forum=kinectv2sdk#4c895477-b120-4806-9f3c-5930b07ac8a1

As explained, I have tried to use the static method Create but I keep getting this error :

Error CS0117: 'Microsoft.Kinect.VisualGestureBuilder.VisualGestureBuilderFrameSource' does not contain a definition for 'Create' (CS0117) (Assembly-CSharp)

Any idea of what I am doing wrong?


Solution

  • Yeah... This is a stupid mistake but hard to recover from once you have done it...

    The official VisualGestureBuilder dll does not have Create methods. They were added in a corresponding unity package to allow instantiation of classes such as VisualGestureBuilderFrameSource.

    In your unity project, you should NOT reference the official Microsoft.Kinect.VisualGestureBuilder.dll but import the VisualGestureBuilder unity package instead. You will find this package in the Kinect plugin for Unity.