---
# System prepended metadata

title: Unity3D專案變成ARcode專案

---


# Unity3D專案變成ARcode專案
在建置專案時選擇3D核心，並製作成AR專案
## 匯入AR Foundation
開啟時先點選Window>Package Manager
![](https://i.imgur.com/xv4oIGg.png)

點選加號旁邊的Package:In Project>Unity Registry
![](https://i.imgur.com/wp3cceH.png)

在右上角輸入AR後，下載左邊的AR Foundation、ARCore XR Plugin
![](https://i.imgur.com/P5EALj0.png)
## 設定鏡頭畫面
接下來把Main Camera刪掉
![](https://i.imgur.com/WVL6uvG.png)

點選加號選取XR>AR Session Origin新增AR Camera
![](https://i.imgur.com/RYMBQKK.png)

在同樣路徑新增AR Session
![](https://i.imgur.com/PHwgkLi.png)

點選AR Session Origin>Add Component新增
- AR Plane Manager
- AR Anchor Manager
- AR Raycast Manager

![](https://i.imgur.com/gQ44Thn.png)
## 建置設定
點擊File>Build Settings進行設定
![](https://i.imgur.com/8K8bVfv.png)

按下Add Open Scenes新增場景
![](https://i.imgur.com/mBpgF5r.png)

選取Android並按下Switch Platform切換平台
![](https://i.imgur.com/FLmmgRY.png)

按下左下角的Player Settings，點選下方XR Plug-in Management，右邊Android的AR Core打勾
![](https://i.imgur.com/xh86Nu8.png)

到左側點選Player，右上角設定
- Company Name(公司名稱)
- Product Name(專案名稱)
- Version(版本)
- Default Icon(圖示)

![](https://i.imgur.com/0YdoZGG.png)

展開下方的Other Settings，取消勾選Auto Graphics API，並把Vulkan刪除
![](https://i.imgur.com/62gXSCT.png)

移到下方更改
- Minimum API Level改成API Level 24
- Scripting Backend改成IL2CPP
- 勾選ARM64

![](https://i.imgur.com/470MeOo.png)

回到Player展開Publishing Settings設定Keystore，而Keystore可依順序分成三個部分
1. Keystore
2. Organization
3. Alisa

![](https://i.imgur.com/1scUs22.png)

### 沒有Keystore
若沒有或者要新增Keystore，點選Keystore Manager跳出此視窗
![](https://i.imgur.com/mwMjL6t.png)

點擊Keystore，若要新增已有的Keystore的Alisa點選Select Existing>Browse選取你的Keysotre；沒有Keystore的點選Create New>Anywhere創建Keystore
![](https://i.imgur.com/lPLmqGB.png)

輸入密碼、Alisa、Organization
![](https://i.imgur.com/gvYqoA2.png)
### 有Keystore
勾選Custom Keystore，點擊Select選取Keystore，輸入Keystore密碼，選取Alisa並輸入密碼
![](https://i.imgur.com/FflCbm5.png)

## 匯出檔案
以上步驟完成後，即可開始創作，創作完後可按右下角Build匯出apk檔
![](https://i.imgur.com/FrF53P3.png)
