한 걸음 두 걸음

unity 유니티 mobile CardBoard 적용시키기 본문

Unity

unity 유니티 mobile CardBoard 적용시키기

언제나 변함없이 2019. 5. 26. 10:28
반응형

먼저 빌드 세팅에서 해당 Scene을 추가시켜주고난 후, 안드로아드 플랫폼으로 스위칭 시켜줍니다. 

저는 mobile(android)에서 볼 것이니까요. 그 다음에 

창 하단에 있는 Player Setting으로 들어가 

(Gradle system : 모바일 환경에서 빌드 / Internal system :apk 파일 생성인데 저는 바로 bulid and run할 예정이기에 gradle로 사용합니다. )

가로모드로 설정해줍니다. 

Company와 ProjectName을 일치되도록 맞춰주시고

 

https://developers.google.com/vr/unity/download

 

Downloads and samples  |  Google VR  |  Google Developers

Terms & Conditions By downloading the Google VR SDK, you agree that the Google APIs Terms of Service govern your use thereof. I have read and agree with the above terms and conditions, proceed to the downloads To develop for Google VR, you need a supported

developers.google.com

여기서 다운받은 GoogleVRForUnity_1.200.0를 unity로 import 시켜줍니다.

임포트가 완료되면 

해당 Folder의 Prefebs에서 GvrEditorEmulator를 Hierarchy에 적용시켜줍니다.

이제 Project Setting - Player에서 

XR Setting - Virtual Reality Supported 체크해주시고, Virtual Reality SDKs에 CardBoard를 추가시켜줍니다.

그리고 Other Setting에서 Package Name맞춰주고, target API Level을 4.4이상으로 맞춰줍니다.

VR카메라와의 충돌을 피하기 위해 Android TV Compatibility로 체크해제하면

 

환경설정 세팅이 끝났습니다. 

이제 USB로 핸드폰과 연결시킨 후, Build Run시켜주면 무사히 설치가 완료됩니다.

 

다음 포스팅으로는 시선 처리까지 하는 것을 설명해보도록 하겠습니다. 시선처리를 통해 간단히 인터페이스를 구현할 수도 있어요~

반응형