static void GetKeyUp(ref bool isKey, AdvancedKey advancedKey, KeyCode eventKeyCode, EventType eventType) { if (eventType == EventType.KeyDown) { if (eventKeyCode == advancedKey.keyCode && advancedKey.GetSpecialKeys()) { isKey = false; } } if (eventType == EventType.KeyUp) { if (eventKeyCode == advancedKey.keyCode) { isKey = true; } } }
public static bool IsOnlyShowKeyPressed(Event currentEvent, bool useSameEditorAsBuildShowKey, AdvancedKey showToggleKeyEditor, AdvancedKey showToggleKeyBuild) { if (useSameEditorAsBuildShowKey || Application.isEditor) { return(showToggleKeyEditor.OnlyGetKey(currentEvent)); } else { return(showToggleKeyBuild.OnlyGetKey(currentEvent)); } }