/// <summary> /// This methode can be used in a update function to detect if a certain key is released. For example: /// If(Input.onKeyUp(KeyCode.Space)){ /// // this is called when the space bar is released /// } /// </summary> /// <param name="code"></param> /// <returns>Returns true or false</returns> public static bool onKeyUp(KeyCode code) { keyObj key = keycodes.keys[code]; if (key != null) { bool b = key.isUp(); if (b) { key.waitForChange = true; } return(b); } else { return(false); } }