private const float inchToCm = 2.54f;
[SerializeField]
private EventSystem eventSystem = null;
[SerializeField]
private float dragThresholdCM = 0.5f;
//For drag Threshold
private void SetDragThreshold()
{
if (eventSystem != null)
{
eventSystem.pixelDragThreshold = (int)(dragThresholdCM * Screen.dpi / inchToCm);
}
}
void Awake()
{
SetDragThreshold();
}
|
'개발메모' 카테고리의 다른 글
오브젝트간 거리 (0) | 2022.11.11 |
---|---|
유니코드 정리 (0) | 2022.09.18 |
WINSCP 접속 안될때(sftp) 종료명령 1 (0) | 2022.02.09 |
패키지 인스톨후 namespace 인식 못할때. (0) | 2021.12.17 |
texmeshpro (font asset creator) 설정 (0) | 2021.11.24 |
앱 제거후 재 설치시 PlayerPrefs 삭제가 안되는 경우 (0) | 2021.11.17 |