Unity에서 Google의 ARCore 사용에 대한 설정을 기록을 남겨본다.
현재는 AR Foundation으로 사용되고 있어서 ARCore의 버전은 2021년도에 1.25 버전까지만 나와 있는 상태다.
Releases · google-ar/arcore-unity-sdk (github.com)
Releases · google-ar/arcore-unity-sdk
ARCore SDK for Unity. Contribute to google-ar/arcore-unity-sdk development by creating an account on GitHub.
github.com
어쨌든 현재 내가 주력으로 Unity 2018.4.3을 사용하고 있어서 업그레이드를 하지 않는 이상 ARCore를 사용할 것이다.
그런데 약 4~5년전 사용할 때와 지금 로봇제작에 응용할 요소를 고려해서 다시금 테스트하려고 했는데 잘 되지 않았다.
분명 그당시 사용할 때 별다른 설정을 하지 않아도 잘 되었는데, 오늘 몇 시간을 테스트해도 잘 안되다가...
결국은 성공했기에 설정을 기록으로 남긴다.
- Unity 버전 : 2018.4.3
- ARcore 버전 : arcore-unity-sdk-1.19.0.unitypackage
- Graphics API : OpenGLE3 (OpenGLE2는 제외하지만 상위 패키지는 사용가능)
- 최소 API Level : 24 (Android 7.0)
- Preferences > Google ARCore > Enable Google ARCore SDK Analytics > UnChecked
- Project Settings > Google ARCore
- AndroidManifest.xml > ARCore 상위버전에서 미사용시 빌드할 때 unable to merge android manifest 오류발생함.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
|
<?xml version="1.0" encoding="utf-8"?>
<manifest
xmlns:android="http://schemas.android.com/apk/res/android"
package="com.unity3d.player"
xmlns:tools="http://schemas.android.com/tools">
<application android:label="@string/app_name">
<activity android:name="com.unity3d.player.UnityPlayerActivity"
android:theme="@style/UnityThemeSelector"
android:exported="true" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
<meta-data android:name="unityplayer.UnityActivity"
android:value="true" />
<meta-data tools:replace="android:value"
android:name="com.google.ar.core"
android:value="required"/>
</activity>
</application>
<uses-sdk
android:minSdkVersion="24"
android:targetSdkVersion="28"/>
<uses-feature android:name="android.hardware.camera"/>
<uses-permission android:name="android.permission.INTERNET"/>
<uses-permission android:name="android.permission.CAMERA"/>
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
</manifest>
|
cs |
위에서 중요한 것은 sdk 버전과 다음 사항이다.
일단 이렇게 하고 빌드하니 정상적으로 작동 되었다.
근데 정말 4~5년 전에는 이런 설정 한 기억이 없는데... 이런거 안해도 잘 되었던 것 같은데 왜 그런지 모르겠다.
...
'개발 관련 > SW, App 관련' 카테고리의 다른 글
Darknet의 weights를 onnx로 컨버팅 (0) | 2024.08.21 |
---|---|
Android TargetSDK API 34 업데이트와 AD_ID 권한 (0) | 2024.08.18 |
주말의 잉여 작업 - 게임 속의 확률 (6) | 2024.07.23 |
Anaconda Jupyter Notebook 실행 오류 (2) | 2024.05.07 |
Unity - Rect Transform (0) | 2024.04.22 |
댓글