AR Foundation笔记01 安卓Setup
环境
macOS Catalina 10.15.6
Unity Hub 2.3.10
Unity 2020.1.6f1c1
配置
File -> Build Settings
切换平台到Android
-> Player Settings
Other Settings -> 改Package Name
Disable Multithread Rendering (Android doesn’t support yet)
Graphics APIs -> disable Vulkan
Minimun API level -> 26
Package
Window -> Package Manager -> Packages : Unity Registry
Sample Scene
删除Main Camera
Right Click -> XR -> AR Session Origin
AR Camera 标签 MainCamera
Right Click -> XR -> AR Session
Right Click -> 3D Object -> Cube
位置改成0,0,0
缩放改成0.2,0.2,0.2
随便转转
Build
手机 -> 开发者模式
连上
File -> Build Settings -> Run Device -> 选中手机
Add Open Scene
Build and Run
成功~