블로그 이미지
Every unexpected event is a path to learning for you.

카테고리

분류 전체보기 (2737)
Unity3D (817)
Programming (474)
Server (33)
Unreal (4)
Gamebryo (56)
Tip & Tech (228)
협업 (58)
3DS Max (3)
Game (12)
Utility (136)
Etc (96)
Link (32)
Portfolio (19)
Subject (90)
iOS,OSX (53)
Android (14)
Linux (5)
잉여 프로젝트 (2)
게임이야기 (3)
Memories (20)
Interest (38)
Thinking (38)
한글 (30)
PaperCraft (5)
Animation (408)
Wallpaper (2)
재테크 (18)
Exercise (3)
나만의 맛집 (3)
냥이 (10)
육아 (16)
Total
Today
Yesterday
04-19 00:04

EditorWindow에서 Input 클래스는 안먹히는가 보다.

(참조 : http://answers.unity3d.com/questions/15067/input-in-editor-scripts.html)

그래서 대신 사용하는 게 Event 클래스..



Event


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.

Variables
rawType

type

The type of event.

mousePosition

The mouse position.

delta

The relative movement of the mouse compared to last event.

button

Which mouse button was pressed.

modifiers

Which modifier keys are held down.

clickCount

How many consecutive mouse clicks have we received.

character

The character typed.

commandName

The name of an ExecuteCommand or ValidateCommand Event.

keyCode

The raw key code for keyboard events.

shift

Is Shift held down? (Read Only)

control

Is Control key held down? (Read Only)

alt

Is Alt/Option key held down? (Read Only)

command

Is Command/Windows key held down? (Read Only)

capsLock

Is Caps Lock on? (Read Only)

numeric

Is the current keypress on the numeric keyboard? (Read Only)

functionKey

Is the current keypress a function key? (Read Only)

isKey

Is this event a keyboard event? (Read Only)

isMouse

Is this event a mouse event? (Read Only)

Functions
GetTypeForControl

Use

Use this event.

Class Variables
current

The current event that's being processed right now.

Class Functions
KeyboardEvent

Create a keyboard event.



링크 : http://docs.unity3d.com/Documentation/ScriptReference/Event.html

반응형

'Unity3D > Tips' 카테고리의 다른 글

유니티 소소한 TIP  (0) 2013.04.05
How to get SceneView Camera?  (0) 2013.03.25
비활성화 된 오브젝트 찾을 때..  (0) 2013.03.21
iOS 60프레임으로 셋팅하기  (0) 2013.03.08
씬 로딩화면  (0) 2013.03.08
Posted by blueasa
, |