본문 바로가기
VR, AR, MR

유니티 오큘러스 GO 연동, 빌드하기

by Park Hyun Kook 2019. 11. 27.

Unity 2018.1.0f2 버전에서 진행

 

 

1.핸드폰, 오큘러스 GO 연동

1) 핸드폰으로 오큘러스 모바일 다운받기

2) 오큘러스 계정생성

3) 핸드폰과 오큘러스 연동하기

4) 연동 후 오큘러스 설정에 들어가서 개발자 모드 on하기

 

2. Unity setting

1) 오큘러스 유니티 패키지 다운로드

https://developer.oculus.com/downloads/unity/

 

Unity | Developer Center | Oculus

Oculus Audio Profiler for Windows

developer.oculus.com

2) 오큘러스 Integration 다운로드

https://developer.oculus.com/downloads/package/unity-integration/

 

Unity Integration | Developer Center | Oculus

Oculus Integration for Unity - 1.43 Unity provides built-in VR support for the Oculus Rift, Oculus Quest, and Oculus Go. The Oculus Integration for Unity package adds scripts, prefabs, samples, and other resources to supplement Unity’s built-in support. Th

developer.oculus.com

오큘러스 고에서 다른 사람의 계정과 연동되어 있으면, 초기화를 해줘야 함!

초기화: 오큘러스고 음향조절 -버튼과 전원버튼을 5초 누르면 영어로 셋팅창이 나오고

2번째의 공장초기화를 누르면 모든 데이터가 초기화된다.

 

3) 유니티에 안드로이드 셋팅

Edit -> Preferences -> External Tool

초기에는 아래 SDK, JDK, NDK, 이 3부분이 비어있는데 옆에 Download로 다운로드 받고 해당경로 추가하기!

SDK의 경우 안드로이드 스튜디오를 다운로드 받고 스튜디오 내부에서 SDK를 추가적으로 다운로드 받아야함

File-> setting -> Appearance & Behavior -> System settings -> Android SDK에서 다운로드 가능하며

본인은 어떤 버전을 사용할지 몰라 모든 버전을 전부 다운로드 받음.

SDK의 경우 경로가 user\user\AppData\Local\Android\Sdk 이런식인데 여기서 AppData는 숨겨져 있어서 처음 다운로드 받을 때 경로를 잘 확인해야한다. 위의 사진에서 빨간 박스로 표시해둔게 SDK가 다운로드될 경로

 

 

 

4) Build Setting에서 안드로이드로 플랫폼 변경하기! (switch Platform)

 

5) Player Setting- XRSettings > Virtual Reality Supported 체크를 해주고 아래에 있는 플러스 (+) 눌러서 Oculus를 추가하기

 

6) Oculus > Tools에서 플랫폼 설정

 

3. 유니티 apk 빌드

위의 모든 셋팅이 끝난 후 

1) 빌드할 secene 로드

2) 연동된 오큘러스 확인

3) build and run 하면 apk 생성

 

4. 오큘러스 고 apk 실행

1) 오큘러스 고 ADB 드라이버를 설치하고, inf파일을 마우스 우클릭으로 설치한다.

https://developer.oculus.com/downloads/package/oculus-adb-drivers/

 

Oculus ADB Drivers | Developer Center | Oculus

Oculus ADB Drivers 2.0 This download contains the drivers required to use ADB with Android-based Oculus devices. Version 2 adds support for MTP mode connections. For more information, review the ADB documentation.

developer.oculus.com

설치된 adb 드라이버는 C:\Users\사용자윈도우계정\AppData\Local\Android\Sdk\platform-tools 내에 설치됨

 

2) cmd창 관리자권한으로 실행

3) cd ..  2번 입력 후 위의  adb 드라이버 위치로 들어가야함!

>> cd Users\사용자윈도우계정\AppData\Local\Android\Sdk\platform-tools

4) 오큘러스와 컴퓨터 USB로 연동 (오큘러스에서 디버깅허용버튼을 눌러야함! 안나오면 오큘러스 재부팅시켜보기)

5) cmd 창에 adb devices를 쳤을때 기기 아이디가 나오면 제대로 연결된것

6) 빌드한 apk 경로 확인후 adb install __apk경로를 치면 success라고 나오며, 알수없는 라이브러리에 해당앱이 설치

'VR, AR, MR' 카테고리의 다른 글

MR 홀로렌즈의 spatial mapping  (0) 2019.02.26

댓글