if(Application.platform == RuntimePlatform.WindowsEditor) { // 현재 플랫폼이 Window 에디터인지
if(Input.GetMouseButtonDown(0)) {
Vector3 p = Input.mousePosition;
Ray cast = Camera.main.ScreenPointToRay(Input.mousePosition);
// Mouse의 포지션을 Ray cast 로 변환
RaycastHit hit;
if(Physics.Raycast(cast, out hit)) {
// TO DO ANY THING...
}// RayCast
}// Mouse Click
Unity mouse Drag object/ Touch moved (0) | 2019.01.15 |
---|---|
how to change script editor in Unity (0) | 2019.01.08 |
Unity Drag Camera Movement (0) | 2018.10.25 |
Unity Screen rotation Fixed (0) | 2018.10.22 |
Unity Phone Screen Resolution Sizing (0) | 2018.10.22 |
Unity Mouse & Touch Position Convert World Position Code (0) | 2018.10.22 |