Unity打包Android平台AssetBundle指令碼

來源:互聯網
上載者:User

標籤:universal   targe   tor   命名   android平台   idg   board   windows   val   

注意,BuildTarget tagetPlatform參數為BuildTarget.Android

using UnityEngine;using UnityEditor;public class BuildAssetBundlesExample: MonoBehaviour{    [MenuItem("Example/Build Asset Bundles")]    static void BuildABs()    {        // Put the bundles in a folder called "ABs" within the Assets folder.        BuildPipeline.BuildAssetBundles("Assets/ABs", BuildAssetBundleOptions.None, BuildTarget.Android);    }}
 BuildTarget 編譯目標

類型:Enumeration

Target build platform.

目標編譯平台。

Note: This is an editor class. To use it you have to place your script in Assets/Editor inside your project folder. Editor classes are in the UnityEditor namespace so for C# scripts you need to add "using UnityEditor;" at the beginning of the script.
注意:這是一個編輯器類,如果想使用它你需要把它放到工程目錄下的Assets/Editor檔案夾下。編輯器類在UnityEditor命名空間下。所以當使用C#指令碼時,你需要在指令碼前面加上 "using UnityEditor"引用。

參見: BuildPipeline.BuildPlayer.

Values值
    • WebPlayerBuild a web player. // 編譯一個網路播放器。
    • WebPlayerStreamedBuild a streamed web player. // 編譯一個流播放器。
    • DashboardWidgetBuild an OS X Dashboard widget.
      編譯一個OS X Dashboard widget(儀表板小工具)。
    • StandaloneOSXUniversalBuild an OS X standalone. // 編譯一個OS X 獨立版。
    • StandaloneOSXPPCBuild an OS X standalone (PowerPC only).
      編譯一個OS X 獨立版(僅PowerPC處理器)。
    • StandaloneOSXIntelBuild an OS X standalone (Intel only).
      編譯一個OS X 獨立版(僅Intel處理器)。
    • StandaloneWindowsBuild a Windows standalone. // 編譯一個Windows獨立版。
    • iPhoneBuild an iPhone player // 編譯一個iPhone播放器。
    • PS3Build a PS3 Standalone // 編譯一個PS3獨立版。
    • XBOX360Build a XBox Standalone // 編譯一個XBox獨立版。
    • AndroidBuild an Android .apk standalone app
      編譯一個安卓.apk獨立版應用。
    • WiiBuild a Wii standalone // 編譯一個Wii獨立版。
    • StandaloneWindows64Build a Windows 64-bit standalone. // 編譯Windows獨立版64位。

  

Unity打包Android平台AssetBundle指令碼

相關文章

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.