本章要來介紹部署到Android端的方法,輸出Android的APK檔案不需要像iOS一樣那麼麻煩,不需要先建立一個專案就可以直接輸出APK檔案,簽章的部分也很方便。再講輸出之前,先跟大家介紹一個好東西-Cache Server。 由於我們會常常需要切換多個平台進行測試,就很容易遇到切換的時候,Unity必須將相關資源重新匯入,如Unity官方所說: Unity has a completely automatic Asset pipeline. Whenever a source Asset like a .psd or an .fbx file is modified, Unity detects the change and automatically re-imports it. The imported data from the file is subsequently stored by Unity in an internal format.This arrangement is designed to make the workflow as efficient and flexible as possible for an individual user. Furthermore, Assets must be reimported when you switch between desktop and mobile build target platforms. The switch can therefore take a long time for large projects. 簡言之,Unity會以他們的內部格式來儲存資源,不管是音訊、影片、3D模型等等,只要有修改就會自動重新Import,切換平台的時候也必須要重新Import。若使用Cache Server的話,就會自動緩存前一個平台的資源,切換的時候會從Cache Server上下載。 如果是單獨開發,可以將Cache Server建立在local,如果是團隊開發,可以買一台Server來建立,下載Unity提供的Server端即可,Server的作業系統建議選擇Linux/MacOS,Windows則容易因為檔案被Lock的問題產生不可預期的錯誤。更詳細的說明可以...