1. 程式人生 > >Unity打包平臺設定

Unity打包平臺設定

播放器設定是將在Unity中編譯最終遊戲時定義的各種引數(特定平臺)的地方。當開啟獨立版遊戲,啟動時例如使用在解析度對話方塊的這些值,當編譯iOS裝置遊戲時,使用於Xcode的一些值,因此,正確地填寫它們是十分重要的。

To see the Player Settings choose Edit->Project Settings->Player from the menu bar.

從選單欄檢視播放器設定,選擇 Edit->Project Settings->Player


Global Settings that apply to any project you create.
將應用於所有專案的全域性設定

  • Cross-Platform Properties 跨平臺特性
  • Company Name 公司名稱 The name of your company. This is used to locate the preferences file.
    您的公司名稱, 這是用來設定引數檔案。
  • Product Name 產品名稱 The name that will appear on the menu bar when your game is running and is used to locate the preferences file also.
    當遊戲執行時,這個名字將出現在選單欄。並且也被使用來設定引數檔案。
  • Default Icon 預設圖示 Default icon the application will have on every platform (You can override this later for platform specific needs).
    將應用於每一個平臺的預設圖示(特定平臺需要以後還可以覆蓋這個)。

Per-Platform Settings 各平臺設定

Desktop

Web-Player Web播放器

Resolution And Presentation 解析度和描述

  • Resolution 解析度
  • Default Screen Width
    預設螢幕寬度
    Screen Width the player will be generated with.
    播放器將生成的螢幕寬度。
  • Default Screen Height
    預設螢幕高度 Screen Height the player will be generated with.
    播放器將生成的螢幕高度。
  • Run in background
    後臺執行 Check this if you dont want to stop executing your game if the player looses focus.
    如果不想在播放器失去焦點時停止運行遊戲,請勾選此項。
  • WebPlayer Template
    網路播放器模板 For more information you should check the "Using WebPlayer templates page", note that for each built-in and custom template there will be an icon in this section.
    檢視更多資訊參閱"使用Web播放器模板頁"。注意,對於每一個內建和自定義模板將會對應一個圖示在此處顯示。

Icon 圖示

Icons don't have any meaning for most webplayer builds but they are needed for Native Client builds used as Chrome applications. You can set these icons here.

圖示對於大多數Web播放器沒有任何意義,但是在編譯Chrome應用的本地客戶端時需要使用,你可以在這裡設定這些圖示。

Other Settings 其他設定

  • Rendering 渲染
  • Rendering Path 渲染路徑 This property is shared between Standalone and WebPlayer content.
    此屬性是在單機版和Web版兩者共享的。
  •     Vertex Lit 頂點光照 Lowest lighting fidelity, no shadows support. Best used on old machines or limited mobile platforms.
    最低光照保真,不支援陰影,最好用於老機器或受限的手機平臺。
  •     Forward with Shaders 
        正向著色器 Good support for lighting features; limited support for shadows.
    很好的支援光照特性,有限的支援陰影。
  •     Deferred Lighting 
        延時光照 Best support for lighting and shadowing features, but requires certain level of hardware support. Best used if you have many realtime lights. Unity Pro only.
    最好的支援光照和陰影特性,但需要一定程度的硬體支援。最好有許多實時光照時使用。Untiy專業版功能。
  • Color Space 色彩空間 The color space to be used for rendering 用於渲染的色彩空間
  •     GammaSpace Rendering
        伽馬空間渲染 Rendering is gamma-corrected 
    伽馬校正渲染
  •     Linear Rendering
        線性渲染 Rendering is done in linear space 
    線上性空間渲染
  • Hardware Sampling 硬體取樣
  • Static Batching
    靜態批處理 Set this to use Static batching on your build (Inactive by default in webplayers). Unity Pro only.
    編譯時設定使用靜態批處理(在Web播放器中預設無效)。 Unity 專業版功能 。
  • Dynamic Batching 
    動態批處理 Set this to use Dynamic Batching on your build (Activated by default).
    編譯時設定使用動態批處理(預設啟用)。
  • Streaming 流處理
  • First Streamed Level
    首先流處理的關卡 If you are publishing a Streamed Web Player, this is the index of the first level that will have access to all Resources.Load assets.
    如果你想釋出流媒體網路播放器, 這是第一個關卡的索引,它將訪問所有Resources.Load載入的資源。

Standalone 單機

Resolution And Presentation 解析度和描述

  • Resolution 解析度
  • Default Screen Width
    預設螢幕寬度 Screen Width the stand alone game will be using by default.
    單機遊戲預設的螢幕寬度。
  • Default Screen Height
    預設螢幕高度 Screen Height the plater will be using by default.
    單機遊戲預設的螢幕高度。
  • Run in background
    後臺執行 Check this if you dont want to stop executing your game if it looses focus.
    如果你不想在遊戲失去焦點時停止遊戲,請勾選此項。
  • Standalone Player Options 單機遊戲播放器選項
  • Default is Full Screen
    預設為全屏 Check this if you want to start your game by default in full screen mode.
    如果你想開始遊戲後預設全屏模式,勾選此項。
  • Capture Single Screen
    捕獲單屏 If enabled, standalone games in fullscreen mode will not darken the secondary monitor in multi-monitor setups.
    如果開啟,在全屏模式下單機遊戲不會在多顯示器設定的第二顯示器變暗。
  • DisplayResolution Dialog 顯示解析度對話方塊
  •     Disabled 禁用 No resolution dialog will appear when starting the game.
    在遊戲開始時,不顯示解析度對話方塊。
  •     Enabled 啟用 Resolution dialog will always appear when the game is launched.
    在遊戲開始時,顯示解析度對話方塊。
  • Hidden by default 預設隱藏 The resolution player is possible to be opened only if you have pressed the "alt" key when starting the game.
    在遊戲開始時按“alt”鍵才能開啟解析度對話方塊。
  • Use Player Log 使用播放器日誌 Write a log file with debugging information.
    寫入帶有除錯資訊的日誌。
  • Mac App Store Validation
    Mac應用商店驗證 Enable receipt validation for the Mac App Store.
    開啟Mac應用商店驗證。
  • Supported Aspect Ratios
    支援的長寬比 Aspect Ratios selectable in the Resolution Dialog will be monitor-supported resolutions of enabled items from this list.
    可選長寬比,在解析度對話方塊將提供顯示器支援的解析度。

Icon 圖示

  • Override for Standalone
    覆蓋圖示 Check if you want to assign a custom icon you would like to be used for your standalone game. Different sizes of the icon should fill in the squares below.
    如果你想自定義單機遊戲的圖示,請勾選。對應不同大小的圖示填入方框。

Splash Image 開機畫面

  • Config Dialog Banner
    配置對話方塊橫幅 Add your custom splash image that will be displayed when the game is starting.
    新增自定義開機畫面,將在遊戲開始時顯示。

Other Settings 其他設定

  • Rendering 渲染
  • Rendering Path 渲染路徑 This property is shared between Standalone and WebPlayer content.
    此屬性是在單機版和Web版兩者共享的。
  •     Vertex Lit 頂點光照 Lowest lighting fidelity, no shadows support. Best used on old machines or limited mobile platforms.
    最低光照保真,不支援陰影,最好用於老機器或受限的手機平臺。
  •     Forward with Shaders
        正向著色器 Good support for lighting features; limited support for shadows.
    很好的支援光照特性,有限的支援陰影。
  •     Deferred Lighting
        延時光照 Best support for lighting and shadowing features, but requires certain level of hardware support. Best used if you have many realtime lights. Unity Pro only.
    最好的支援光照和陰影特性,但需要一定程度的硬體支援。最好有許多實時光照時使用。Untiy專業版功能。
  • Color Space 色彩空間 The color space to be used for rendering 用於渲染的色彩空間
  •     GammaSpace Rendering
        伽馬空間渲染 Rendering is gamma-corrected
    伽馬校正渲染
  •     Linear Rendering 線性渲染 Rendering is done in linear space
    線上性空間渲染
  • Hardware Sampling 硬體取樣
  • Static Batching 靜態批處理 Set this to use Static batching on your build (Inactive by default in webplayers). Unity Pro only.
    編譯時設定使用靜態批處理(在Web播放器中預設無效)。 Unity 專業版功能 。
  • Dynamic Batching 動態批處理 Set this to use Dynamic Batching on your build (Activated by default).
    編譯時設定使用動態批處理(預設啟用)。
  • API Compatibility Level API相容性級別
  •     .Net 2.0 .Net 2.0 libraries. Maximum .net compatibility, biggest file sizes
    .Net 2.0 庫。 最大.net 相容性, 最大檔案大小。
  •     .Net 2.0 Subset
        .Net 2.0 子集 Subset of full .net compatibility, smaller file sizes
    完整的子集 .net 相容性,較小的檔案大小。
iOS

Resolution And Presentation 解析度和描述

  • Resolution 解析度
  • Default Orientation 預設方向 (This setting is shared between iOS and Android devices)
    (此項在IOS和Android裝置共享)
  •     Portrait 縱向 The device is in portrait mode, with the device held upright and the home button at the bottom.
    裝置為縱向模式,裝置垂直手持並home鍵在底部。
  •     Portrait Upside Down (iOS Only)
        縱向倒置 (僅iOS) The device is in portrait mode but upside down, with the device held upright and the home button at the top.
    裝置為縱向倒置模式,裝置垂直手持並home鍵在頂部。
  •     Landscape Right (iOS Only)
        右橫向 (僅iOS) The device is in landscape mode, with the device held upright and the home button on the leftside.
    裝置為橫向模式,裝置垂直手持並且home鍵在左邊。
  •     Landscape Left
        左橫向 The device is in landscape mode, with the device held upright and the home button on the rightside.
    裝置為橫向模式,裝置垂直手持並且home鍵在右邊。
  •     Auto Rotation 自動旋轉 The screen orientation is automatically set based on the physical device orientation.
    基於裝置物理裝置方向,自動設定螢幕方向。
  • Auto Rotation settings 自動旋轉設定
  •     Use Animated Autorotation
        使用帶動畫的自動旋轉 When checked, orientation change is animated. This only applies when Default orientation is set to Auto Rotation.
    當勾選,改變方向將帶有動畫效果。這僅適用於預設方向設定為自動旋轉時。
  • Allowed Orientations for Auto Rotation 允許方向為自動旋轉
  •     Portrait 縱向 When checked, portrait orientation is allowed. This only applies when Default orientation is set to Auto Rotation.
    當勾選,允許縱向,這僅適用於預設方向設定為自動旋轉時。
  •     Portrait Upside Down
        縱向且上下顛倒 When checked, portrait upside down orientation is allowed. This only applies when Default orientation is set to Auto Rotation.
    當勾選,允許縱向倒置,這僅適用於預設方向設定為自動旋轉時。
  •     Landscape Right
        右橫向 When checked, landscape right (home button on the left side) orientation is allowed. This only applies when Default orientation is set to Auto Rotation.
    當勾選,右允許橫向(home 鍵左邊)這僅適用於預設方向設定為自動旋轉時。
  •     Landscape Left
        左橫向 When checked, landscape left (home button is on the right side) orientation is allowed. This only applies when Default orientation is set to Auto Rotation.
    當勾選,允許左橫向(home 鍵右邊)這僅適用於預設方向設定為自動旋轉時。
  • Status Bar 狀態列
  • Status Bar Hidden 隱藏狀態列 Specifies whether the status bar is initially hidden when the application launches.
    當應用啟動時,指定狀態條是否最初隱藏。
  • Status Bar Style 狀態列樣式 Specifies the style of the status bar as the application launches
    當應用啟動時,指定狀態條的樣式。
  •     Default 預設
  •     Black Translucent 黑色半透明
  •     Black Opaque 黑色不透明
  • Use 32-bit Display Buffer
    使用32位顯示緩衝器 Specifies if Display Buffer should be created to hold 32-bit color values (16-bit by default). Use it if you see banding, or need alpha in your ImageEffects, as they will create RTs in same format as Display Buffer.
    如果顯示緩衝器被建立持有32位顏色值時指定(預設16位)。如果你看到條帶或你的影象效果需要alpha時使用,將以相同的格式建立TRs作為顯示緩衝器。在執行pre-Gingerbread作業系統的裝置不支援(將強制為16位)。
  • Show Loading Indicator
    顯示載入條 Options for the loading indicator 
    載入條選項
  •     Don't Show 不顯示 No indicator 無載入條
  •     White Large 白色大 Indicator shown large and in white 載入條較大,並且為白色
  •     White 白色 Indicator shown at normal size in white 載入條為正常大小,並且為白色
  •     Gray 灰色 Indicator shown at normal size in gray 載入條為正常大小,並且為灰色

Icon 圖示

  • Override for iOS
    覆蓋圖示 Check if you want to assign a custom icon you would like to be used for your iPhone/iPad game. Different sizes of the icon should fill in the squares below.
    如果想為你的iPhone/iPad遊戲只定義個圖示,請選擇。對應不同大小的圖示填入方框中。
  • Prerendered icon 預渲染圖示 If unchecked iOS applies sheen and bevel effects to the application icon.
    如果不勾選,iOS應用光澤和斜角效果到應用程式的圖示。

Splash Image 開機畫面

  • Mobile Splash Screen 手機開機畫面
    (Pro-only feature)(專業版功能) Specifies texture which should be used for iOS Splash Screen. Standard Splash Screen size is 320x480.(This is shared between Android and iOS)
    指定用於IOS開機畫面紋理。 標準開機畫面的尺寸為320x480。(此項與Android 和 iOS共享)
  • High Res. iPhone (Pro-only feature)
    iphone高解析度開機畫面(專業版功能) Specifies texture which should be used for iOS 4th gen device Splash Screen. Splash Screen size is 640x960.
    指定用於IOS第四代裝置的開機畫面紋理。 開機畫面的尺寸為640x960。
  • iPad Portrait (Pro-only feature)
    iPad縱向(專業版功能) Specifies texture which should be used as iPad Portrait orientation Splash Screen. Standard Splash Screen size is 768x1024.
    指定用於iPad縱向的開機畫面紋理。 標準開機畫面的尺寸為768x1024。
  • iPad Landscape (Pro-only feature)
    iPad橫向(專業版功能) Specifies texture which should be used as iPad Landscape orientation Splash Screen. Standard Splash Screen size is 1024x768.
    指定用於iPad橫向的開機畫面紋理。 標準開機畫面的尺寸為1024x768。

Other Settings 其它設定

  • Rendering 渲染
  • Static Batching 靜態批處理 Set this to use Static batching on your build (Activated by default). Pro-only feature.
    設定使用Static batching編譯(預設啟用的)。僅專業版功能
  • Dynamic Batching 動態批處理 Set this to use Dynamic Batching on your build (Activated by default).
    設定使用Dynamic batching編譯(預設啟用的)。
  • Identification 識別符號
  • Bundle Identifier 包識別符號 The string used in your provisioning certificate from your Apple Developer Network account(This is shared between iOS and Android)
    從蘋果開發者網路帳戶在你的證書中使用的字串。(此項與iOS 和 Android共享)
  • Bundle Version 包版本 Specifies the build version number of the bundle, which identifies an iteration (released or unreleased) of the bundle. This is a monotonically increased string, comprised of one or more period-separated
    指定該包的版本號,包的迭代版本號(釋出或未釋出的)。這是單一性的增加字串,由一個或多個句點分割。 (此項與iOS 和 Android共享)
  • Configuration 配置
  • Target Device 目標裝置 Specifies application target device type. 指定應用程式目標裝置型別。
  •     iPhone Only Application is targeted for iPhone devices only.
    應用程式目標裝置僅為iPhone。
  •     iPad Only Application is targeted for iPad devices only.
    應用程式目標裝置僅為iPad。
  •     iPhone + iPad Application is targeted for both iPad and iPhone devices.
    應用程式目標為iPad and iPhone裝置。
  • Target Platform 目標平臺 Specifies the target arquitecture you are going to build for.(This setting is shared between iOS and Android Platforms)
    指定你將要編譯的目標架構(此項與Android 和 iOS平臺共享)
  •     armv6 (OpenGL ES1.1) Application is optimized for armv6 chipsets 
    對於armv6晶片組優化的應用程式
  •     Universal armv6+armv7
        (OpenGL ES1.1+2.0) Application supports both armv6 and armv7 chipsets. Note: increases application distribution size
    應用程式支援armv6和armv7晶片組。 注意: 將會增加應用程式的大小
  •     armv7 Application is optimized for armv7 chipsets. 1st-2nd gen. devices are not supported. There might be additional requirements for this build target imposed by Apple App Store. Defaults to OpenGL ES 2.0.
    對於armv7晶片組優化的應用程式,不支援一代和二代裝置。對於此編譯目標蘋果應用商店有可能額外強加要求,預設 OpenGL ES 2.0。
  • Target Resolution 目標解析度 Resolution you want to use on your deployed device.(This setting will not have any effect on devices with maximum resolution of 480x320)
    你要部署的裝置上使用的解析度。(此設定對裝置的最大分辯率480x320不會有任何影響)
  •     Native(Default Device Resolution)
        本地(預設裝置解析度) Will use the device native resolution. 
    將使用裝置的本地解析度。
  •     Standard 標準(中低解析度)
        (Medium or Low Resolution) Use the lowest resolution possible (480x320).
    儘可能使用最低解析度(480x320)。
  •     HD 高清 (最高解析度)
        (Highest available resolution) Use the maximum resolution allowed on the device (960x640).
    使用裝置允許最大的解析度 (960x640)。
  • Accelerometer Frequency
    加速計頻率 How often the accelerometer is sampled
    加速度計多長時間取樣
  •     Disabled 禁用 Accelerometer is not sampled 加速計不採樣
  •     15Hz 15 samples per second 每秒15次
  •     30Hz 30 samples per second 每秒30次
  •     60Hz 60 samples per second 每秒60次
  •     100Hz 100 samples per second 每秒100次
  • Override iPod Music
    覆蓋iPod音樂 If selected application will silence user's iPod music. Otherwise user's iPod music will continue playing in the background.
    如果選擇,應用程式將使用者的iPod音樂靜音。否則,使用者的iPod音樂將會繼續在後臺播放。
  • UI Requires Persistent WiFi
    使用者介面需要持久WiFi連結 Specifies whether the application requires a Wi-Fi connection. iOS maintains the active Wi-Fi connection open while the application is running.
    指定應用程式是否需要Wi-Fi連線,當應用程式執行,iOS提供可用Wi-Fi連線。
  • Exit on Suspend
    退出後掛起 Specifies whether the application should quit when suspended to background on iOS versions that support multitasking.
    指定應用程式是否應退出後在後臺掛起,需IOS版本支援多工。
  • Optimization 優化
  • Api Compatibility Level 
    API相容性級別 Specifies active .NET API profile
    指定可用的 .NET API 設定檔
  • .Net 2.0 .Net 2.0 libraries. Maximum .net compatibility, biggest file sizes
    Net 2.0 庫. 最大的.net 相容性,最大檔案大小
  • .Net 2.0 Subset 
    .Net 2.0子集 Subset of full .net compatibility, smaller file sizes
    完整的子集 .net 相容性,較小的檔案大小
  • AOT compilation options
    AOT編譯器選項 Additional AOT compiler options.
    額外的AOT編譯器選項。
  • SDK Version
    SDK版本 Specifies iPhone OS SDK version to use for building in Xcode
    指定在Xcode中編譯時所用的iPhone系統的SDK版本
  •     iOS 4.0 iOS SDK 4.0.
  •     iOS Simulator 4.0 iOS Simulator 4.0. Application built for this version of SDK will be able to run only on Simulator from the SDK 4.
    iOS 模擬器 4.0,對於這個SDK版本編譯的應用程式,只能夠從SDK4的模擬器上執行。
  •     iOS 4.1 iOS 4.1.
  •     iOS Simulator 4.1 iOS Simulator 4.1. Application built for this version of SDK will be able to run only on Simulator from the SDK 4.x.
    iOS 模擬器 4.1,對於這個SDK版本編譯的應用程式,只能夠從SDK 4.x的模擬器上執行。
  •     iOS 4.2 iOS 4.2.
  •     iOS Simulator 4.2 iOS Simulator 4.2. Application built for this version of SDK will be able to run only on Simulator from the SDK 4.x.
    iOS 模擬器 4.2,對於這個SDK版本編譯的應用程式,只能夠從SDK 4.x的模擬器上執行。
  •     iOS 4.3 iOS 4.3.
  •     iOS Simulator 4.3 iOS Simulator 4.3. Application built for this version of SDK will be able to run only on Simulator from the SDK 4.x.
    iOS 模擬器 4.3,對於這個SDK版本編譯的應用程式,只能夠從SDK 4.x的模擬器上執行。
  •     iOS 5.0 iOS 5.0
  •     iOS Simulator 5.0 iOS Simulator 5.0. Application built for this version of SDK will be able to run only on Simulator from the SDK 5.x.
    iOS 模擬器 5.0,對於這個SDK版本編譯的應用程式,只能夠從SDK 5.x的模擬器上執行。
  •     iOS latest 最新的iOS Latest available iOS SDK. Available since iOS SDK 4.2. (default value)
    最新可用的iOS SDK, 自iOS SDK 4.2以後可用 (預設值)
  •     iOS Simulator latest
        最新的iOS模擬器 Latest available iOS Simulator SDK. Available since iOS SDK 4.2.
    最新可用的iOS模擬器 SDK,自iOS SDK 4.2以後可用。
  •     Unknown 未知 iOS SDK version is not managed by Unity Editor.
    iOS SDK version 沒有被Unity託管。
  • Target iOS Version
    目標IOS版本 Specifies lowest iOS version where final application will able to run
    指定最終應用程式將能執行的最低IOS版本。
  •     3.0 iPhone OS 3.0. (default value)
  •     3.1 iPhone OS 3.1.
  •     3.1.2 iPhone OS 3.1.2.
  •     3.1.3 iPhone OS 3.1.3.
  •     3.2 iPhone OS 3.2.
  •     4.0 iPhone OS 4.0.
  •     4.1 iPhone OS 4.1.
  •     4.2 iPhone OS 4.2.
  •     4.3 iPhone OS 4.3.
  •     5.0 iPhone OS 5.0
  •     Unknown 未知 iPhone OS SDK version is not managed by Unity Editor.
    iPhone系統的SDK版本,未被Unity編輯器託管。
  • Stripping Level (Pro-only feature)
    剝離級別(專業版功能) Options to strip out scripting features to reduce built player size(This setting is shared between iOS and Android Platforms)
    可選剝離指令碼功能,來減少構建播放器大小(此設定與iOS和Andriod平臺共享)
  •     Disabled 禁用 No reduction is done. 不減少。
  •     Strip Assemblies 剝離程式集 Level 1 size reduction. 1級大小減少。
  •     Strip ByteCode 剝離字符集 Level 2 size reduction (includes reductions from Level 1).
    2級大小減少。(包含1級大小減少。)
  •     Use micro mscorlib Level 3 size reduction (includes reductions from Levels 1 and 2).
    3級大小減少。(包含1級和2級大小減少。)
  • Script Call Optimization
    指令碼呼叫優化 Optionally disable exception handling for a speed boost at runtime
    可選擇禁用異常處理,用於執行時的速度提升。
  •     Slow and Safe 緩慢而安全 Full exception handling will occur with some performance impact on the device
    處理全部異常將發