To develop applications in Unity for your Tango device, you'llneed the following things:
要在Unity中為Tango設備開發應用程序,您需要以下內容:
Android SDK with package level 17+ installed. 安裝了軟件包級別為17+的Android SDK。Unity (5.2.1 or later), set up forAndroid development. Unity(5.2.1或更高版本),設置為Android開發。Tango Unity SDK. 探戈Unity SDK。On Windows, install the Google USB Driver if your device is not recognized automatically. 在Windows上,如果您的設備無法自動識別,請安裝Google USB驅動程序。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.
將設備插入計算機時,應該會在通知區域看到一個帶有三個垂直條的圖標,并在通知欄中看到“USB調試已連接”。如果不這樣做,您需要按照步驟2啟用USB調試。
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中構建Android項目時,系統會要求您找到安裝了SDK的文件夾。您還可以通過轉到Unity>首選項>外部工具> Android SDK位置手動設置位置。
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個Android API級別。您可以在構建設置下進行設置。導航到文件>構建設置> Android,然后單擊播放器設置....在其他設置下找到最低API級別字段,并將其設置為Android 4.2'Jelly Bean'(APK級別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!
設置完成后,嘗試在Tango上使用我們的Unity操作指南進行運動跟蹤的簡單VR應用程序。還要查看我們的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.
將應用程序使用Tango框架部署到Google Play只需要一個額外的步驟到正常的Android分發過程。要確保您的應用程序只能通過Tango兼容設備安裝,請將以下行添加到應用程序清單文件中<application>標記中。
<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設備使用單個APK,請在運行時檢測Tango功能,并提供適當的體驗。
Safety 安全
Developers of Augmented Reality apps are responsible for taking the necessarysteps to ensure their app is safe for all audiences.
增強現實應用程序的開發人員負責采取必要的措施,以確保他們的應用程序是安全的所有觀眾。
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計劃的增強現實應用程式必須在啟動應用程式時包含安全警告,其中包含以下內容:
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.關于父母監督的重要性的適當信息 2. 提醒您注意真實世界中的身體危險(例如,了解您的周圍環境)
新聞熱點
疑難解答