再拖曳到攝影機上,仔細觀察其輸出的結果
var ms: float = 0; function Update() { if (Input.GetMouseButtonDown(0)) print("Left"); if (Input.GetMouseButtonDown(1)) print("Right"); if (Input.GetMouseButtonDown(2)) print("Middle"); if (Input.GetAxis("Mouse ScrollWheel") < 0) { ms--; print(ms); } else if (Input.GetAxis("Mouse ScrollWheel") > 0) { ms++; print(ms); } } function OnGUI() { var e: Event = Event.current; if (e.isMouse) { print(e.delta); } }
0 ♥:
張貼留言