Sending the C# function parameter to JS function.

I’m trying to implement kinect to one of my games. Already got the function which listens to kinect gestures and recognises them well. Function is written in C#. It basically set boolean function to true after the gesture, than other function is setting it back to false just to reset the flag.

 if (gesture == KinectGestures.Gestures.SwipeLeft)
        {
            swipeLeft = true;
        }

    public bool IsSwipeLeft()
    {
        if (swipeLeft)
        {
            swipeLeft = false;
            return true;
        }
        return false;
    }

I’ve been trying to send that boolean variable to JS function that works as character controller.
I did it like that

public var gesturesListener: GestureListener;

//in start()
gesturesListener=this.GetComponent(GestureListener);

//in controlling function
	if(gesturesListener.IsSwipeLeft())
	{
		GestureInfo.text = "left";
	    return SwipeDirection.Left;
	}

I also tried checking the if swipeLeft var is true but with no effect. I set up debuging to check if it’s working or not.

Does enyone have an idea, how to fix it? Thanks.

You can only reference classes and functions from scripts in other languages if the file containing the class/function you are referencing is put in a ‘Plugins’ or ‘Standard Assets’ folder.