Esempio n. 1
0
        public void KeyDownAndUp(KeyCode key, EventModifiers modifiers = EventModifiers.None)
        {
            HandleLastEventPauseVisibility();

            if (EventUtility.KeyDownAndUp(window, key, modifiers))
            {
                window.RepaintImmediately();
            }
        }
Esempio n. 2
0
        public bool Update(EditorWindow window)
        {
            float curtime = (float)EditorApplication.timeSinceStartup;

            if (curtime > nextEventTime)
            {
                bool shouldContinue = caretPosition < keyCodes.Count;
                if (caretPosition < keyCodes.Count)
                {
                    EventUtility.KeyDownAndUp(window, keyCodes[caretPosition]);
                    caretPosition++;
                    nextEventTime = curtime + intervalBetweenKeyInput;
                    window.Repaint();
                }
                return(shouldContinue);
            }
            return(true);
        }