Version: 2017.2

Event

class in UnityEngine

매뉴얼로 전환

설명

A UnityGUI event.

Events correspond to user input (key presses, mouse actions), or are UnityGUI layout or rendering events.

For each event OnGUI is called in the scripts; so OnGUI is potentially called multiple times per frame. Event.current corresponds to "current" event inside OnGUI call.

See Also: GUI Scripting Guide, EventType.

정적 변수

currentThe current event that's being processed right now.

변수

altIs Alt/Option key held down? (Read Only)
buttonWhich mouse button was pressed.
capsLockIs Caps Lock on? (Read Only)
characterThe character typed.
clickCountHow many consecutive mouse clicks have we received.
commandIs Command/Windows key held down? (Read Only)
commandNameThe name of an ExecuteCommand or ValidateCommand Event.
controlIs Control key held down? (Read Only)
deltaThe relative movement of the mouse compared to last event.
displayIndexIndex of display that the event belongs to.
functionKeyIs the current keypress a function key? (Read Only)
isKeyIs this event a keyboard event? (Read Only)
isMouseIs this event a mouse event? (Read Only)
keyCodeThe raw key code for keyboard events.
modifiersWhich modifier keys are held down.
mousePositionThe mouse position.
numericIs the current keypress on the numeric keyboard? (Read Only)
shiftIs Shift held down? (Read Only)
typeThe type of event.

Public 함수

GetTypeForControlGet a filtered event type for a given control ID.
UseUse this event.

정적 함수

GetEventCountReturns the current number of events that are stored in the event queue.
KeyboardEventCreate a keyboard event.
PopEventGet the next queued [Event] from the event system.