OrthographicSize을 이용한 모바일 해상도 대응
·
게임 개발
Unity로 2D 탑뷰 게임을 개발하며 모바일 해상도 대응 작업을 하다가 이 글을 쓰게 되었다. 카메라의 투영 타입 (Projection Type) 에는 Perspective와 Orthographic이 있다.Perspective는 원근 카메라이며 Orthographic은 직교 카메라이다. Unity Document - Camera.orthographicSize 그중, Orthographic에는 orthographicSize라는 프로퍼티가 있는데, Unity 공식 문서에 따르면, The height of the viewing volume is (orthographicSize * 2) 즉, 화면 높이 = orthographicSize * 2라고 한다. orthographicSize가 10이라면 10 * 2..