To develop applications in Unity for your Tango device, you'llneed the following things:
要在Unity中為Tango設(shè)備開發(fā)應(yīng)用程序,您需要以下內(nèi)容:
Android SDK with package level 17+ installed. 安裝了軟件包級(jí)別為17+的Android SDK。Unity (5.2.1 or later), set up forAndroid development. Unity(5.2.1或更高版本),設(shè)置為Android開發(fā)。Tango Unity SDK. 探戈Unity SDK。On Windows, install the Google USB Driver if your device is not recognized automatically. 在Windows上,如果您的設(shè)備無法自動(dòng)識(shí)別,請(qǐng)安裝Google USB驅(qū)動(dòng)程序。In addition to these files, you will need to do a few more things:
除了這些文件,你將需要做一些事情:
When you plug your device into your computer, you should see an icon with threevertical bars in thenotification area and "USB debugging connected" inthe notification drawer. If you don't, you'll need to enableUSBdebugging by following step 2here.
將設(shè)備插入計(jì)算機(jī)時(shí),應(yīng)該會(huì)在通知區(qū)域看到一個(gè)帶有三個(gè)垂直條的圖標(biāo),并在通知欄中看到“USB調(diào)試已連接”。如果不這樣做,您需要按照步驟2啟用USB調(diào)試。
The first time you build a PRoject for Android in Unity, you will be asked tolocate the folder where you installed the SDK. You can also manually set thelocation by going toUnity > Preferences > External Tools > Android SDKLocation.
首次在Unity中構(gòu)建Android項(xiàng)目時(shí),系統(tǒng)會(huì)要求您找到安裝了SDK的文件夾。您還可以通過轉(zhuǎn)到Unity>首選項(xiàng)>外部工具> Android SDK位置手動(dòng)設(shè)置位置。
Tango requires a minimum Android API level of at least 17 in Unity. You can setthis under Build Settings. Navigate toFile > Build Settings > Android andclick on Player Settings.... UnderOther Settings find the MinimumAPI Level field, and set it toAndroid 4.2 'Jelly Bean' (APK level 17) orhigher.
Tango需要在Unity中至少有17個(gè)Android API級(jí)別。您可以在構(gòu)建設(shè)置下進(jìn)行設(shè)置。導(dǎo)航到文件>構(gòu)建設(shè)置> Android,然后單擊播放器設(shè)置....在其他設(shè)置下找到最低API級(jí)別字段,并將其設(shè)置為Android 4.2'Jelly Bean'(APK級(jí)別17)或更高。
After you're set up, try making a simple VR application on Tango usingour Unity How-to guide for motion tracking.Also check out our Unity code samples on GitHub formore inspiration!
設(shè)置完成后,嘗試在Tango上使用我們的Unity操作指南進(jìn)行運(yùn)動(dòng)跟蹤的簡(jiǎn)單VR應(yīng)用程序。還要查看我們的Unity代碼示例在GitHub更多的靈感!
Deploying applications using the Tango framework to Google Playrequires only one additional step to the normal Androiddistributionprocess. To make sure yourapplication can only be installed by Tango compatible devices, add thefollowing line to your application's manifest file, inside the<application>
tag.
將應(yīng)用程序使用Tango框架部署到Google Play只需要一個(gè)額外的步驟到正常的Android分發(fā)過程。要確保您的應(yīng)用程序只能通過Tango兼容設(shè)備安裝,請(qǐng)將以下行添加到應(yīng)用程序清單文件中<application>標(biāo)記中。
<application...> ... <uses-library android:name="com.projecttango.libtango_device2" android:required="true" /></application>If you want to have a single APK for both Tango and non-Tango devices, detectTango capabilities at runtime and provide the appropriate experience.
如果您想為Tango和非Tango設(shè)備使用單個(gè)APK,請(qǐng)?jiān)谶\(yùn)行時(shí)檢測(cè)Tango功能,并提供適當(dāng)?shù)捏w驗(yàn)。
Safety 安全
Developers of Augmented Reality apps are responsible for taking the necessarysteps to ensure their app is safe for all audiences.
增強(qiáng)現(xiàn)實(shí)應(yīng)用程序的開發(fā)人員負(fù)責(zé)采取必要的措施,以確保他們的應(yīng)用程序是安全的所有觀眾。
Augmented Reality apps that opt-in to the Designed forFamiliesprogram must include a safety warning upon launch of the app that contains thefollowing:
加入Designed for Families計(jì)劃的增強(qiáng)現(xiàn)實(shí)應(yīng)用程式必須在啟動(dòng)應(yīng)用程式時(shí)包含安全警告,其中包含以下內(nèi)容:
An appropriate message about the importance of parental supervisionA reminder to be aware of physical hazards in the real world (e.g., be aware of your surroundings) 1.關(guān)于父母監(jiān)督的重要性的適當(dāng)信息 2. 提醒您注意真實(shí)世界中的身體危險(xiǎn)(例如,了解您的周圍環(huán)境)
新聞熱點(diǎn)
疑難解答
圖片精選
網(wǎng)友關(guān)注