Skip to content

Instantly share code, notes, and snippets.

@gashtio
Created February 20, 2013 08:50
Show Gist options
  • Save gashtio/4994062 to your computer and use it in GitHub Desktop.
Save gashtio/4994062 to your computer and use it in GitHub Desktop.
Modified TriggerOnMouseOrJoystick.js Unity3D script that allows toggling its functionality
...
private var allowInput : boolean = true;
...
function Update () {
if (Input.GetKeyDown(KeyCode.Space))
{
allowInput = !allowInput;
}
if (!allowInput)
{
return;
}
...
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment