Right click inventory function not working :S

Hi, im trying to set up my Inventory system. It is working well, except I am adding a right click function that stays forever. :S

Here is what I have to get rid of it:

if (Event.Current.type == EventType.mouseMove + 30) {
    rightClickItem = false;

Obviously its wrong and not working. But its not throwing errors either… What statement would I use to say when the mouse moves away 30 pixels?


You probably need to give more info. I’m pretty unsure of the functionality you’re looking for. But I can take a shot at it.

You can use Input.mousePosition to get the position of the mouse and store that in a temporary variable then check if the mousePosition.x or y Absolute value is 30 less or more than it was in the temporary variable.

That’s about all I can say without more info. What is the right click function you are making? What does it do?