자주 사용되는 메소드들
자주 사용되는 메소드들
자주 사용되는 메소드들
자주 사용되는 메소드들
public void OnUpHandler() { Ray ray = cam.ScreenPointToRay(Input.mousePosition); if (Physics.Raycast(ray, out RaycastHit hit)) { IClickable clickable = hit.transform.GetComponent <IClickable>(); clickable?.OnUp(); // Do something with the object that was hit by the raycast. } }