最美情侣中文字幕电影,在线麻豆精品传媒,在线网站高清黄,久久黄色视频

歡迎光臨散文網(wǎng) 會(huì)員登陸 & 注冊(cè)

Unity_Addressable_Profiles(配置文件)

2023-04-01 20:38 作者:unity_某某師_高錦錦  | 我要投稿

A profile contains a set of variables used by the Addressables build scripts. These variables define information such as where to save build artifacts and where to load data at runtime. You can add custom profile variables to use in your own build scripts.

譯:一個(gè)profile包含了Addressables構(gòu)建腳本所需要的一組變量。這些變量定義了構(gòu)建產(chǎn)物保存的位置和運(yùn)行時(shí)數(shù)據(jù)加載的位置等信息。您可以添加自定義profile變量并在自己的構(gòu)建腳本中使用。

Open the Profiles window (menu:?Window > Asset Management > Addressables > Profiles) to edit profile values and create new profiles.

譯:打開(kāi)Profiles窗口(菜單:Window> Asset Management> Addressables> Profiles)以編輯profile值并創(chuàng)建新的profile。

The Addressables Profiles window showing the default profile.

You can set up different profiles for the different phases or tasks in your development process. For example, you could create one profile to use while developing your project, one to use for testing, and one to use for final publishing or release. Setting up the profiles in advance and swapping between them is much less error prone than editing the values individually when you move to a different phase or perform a different task.

譯:您可以為開(kāi)發(fā)過(guò)程中的不同階段或任務(wù)設(shè)置不同的profile。例如,您可以創(chuàng)建一個(gè)profile用于開(kāi)發(fā)項(xiàng)目,一個(gè)用于測(cè)試,一個(gè)用于最終發(fā)布或發(fā)布。提前設(shè)置profile并在它們之間切換比在移動(dòng)到不同階段或執(zhí)行不同任務(wù)時(shí)單獨(dú)編輯值要容錯(cuò)性更高。

Right-click a profile name to set it as the active profile, rename the profile, or delete it.

Addressables defines five profile variables by default:

譯:右鍵單擊profile名稱(chēng)可設(shè)置其為活動(dòng)profile,重命名profile或刪除profile。?Addressables默認(rèn)定義了五個(gè)profile變量:

Local: defines two path variables for local content:譯:Local:定義了本地內(nèi)容的兩個(gè)路徑變量:

    • Local.BuildPath: where to build the files containing assets you want to install locally with your application. By default, this path is inside your Project Library folder.譯:Local.BuildPath:要構(gòu)建包含要在應(yīng)用程序中本地安裝的資產(chǎn)的文件的位置。默認(rèn)情況下,此路徑在您的Project Library文件夾內(nèi)。

    • Local.LoadPath: where to load assets installed locally with your application. By default, this path is in the StreamingAssets folder. Addressables automatically includes local content built to the default location in StreamingAssets when you build a Player (but not from other locations).譯:Local.LoadPath:要加載在應(yīng)用程序中本地安裝的資產(chǎn)的位置。默認(rèn)情況下,此路徑在StreamingAssets文件夾中。當(dāng)您構(gòu)建Player時(shí),Addressables會(huì)自動(dòng)將默認(rèn)位置中構(gòu)建的本地內(nèi)容包含在StreamingAssets中(但不包括其他位置)。

  • Remote: defines two path variables for remote content:譯:Remote:定義了遠(yuǎn)程內(nèi)容的兩個(gè)路徑變量:

    • Remote.BuildPath: where to build the files containing assets you plan to distribute remotely.譯:Remote.BuildPath:要構(gòu)建包含要遠(yuǎn)程分發(fā)的資產(chǎn)的文件的位置。

    • Remote.LoadPath: the URL from which to download remote content and catalogs.譯:Remote.LoadPath:下載遠(yuǎn)程內(nèi)容和目錄的URL。

  • BuildTarget: the name of the build target, such as Android or StandaloneWindows64譯:BuildTarget:構(gòu)建目標(biāo)的名稱(chēng),例如Android或StandaloneWindows64

You can choose the following pre-defined?Bundle Locations?for the?Local?and?Remote?path variables:譯:您可以選擇以下預(yù)定義的Bundle Locations用于Local和Remote路徑變量:

  • Built-In: the path definitions for local content. The build system automatically includes content built with this setting in your Player builds. You should not change these path values.譯:Built-In:本地內(nèi)容的路徑定義。構(gòu)建系統(tǒng)會(huì)自動(dòng)包含使用此設(shè)置構(gòu)建的內(nèi)容在您的Player構(gòu)建中。您不應(yīng)更改這些路徑值。

  • Editor Hosted: the path definitions to use with the Editor [Hosting service]. Depending on how you set up the hosting service, you might need to edit the load path to match the service URL.譯:Editor Hosted:與Editor [Hosting service]一起使用的路徑定義。根據(jù)如何設(shè)置托管服務(wù),您可能需要編輯加載路徑以匹配服務(wù)URL。

  • Cloud Content Delivery: the path definitions for the?Unity Cloud Content Delivery?(CCD) service. Requires creating a Unity Project ID in the?Services?section of your Project settings (or linking to an existing ID). You must also install the?CCD Management SDK?package. See?Addressable Asset system with Cloud Content Delivery?for information about setting up and using the?Cloud Content Delivey?Bundle Location?option.譯:Cloud Content Delivery:Unity Cloud Content Delivery(CCD)服務(wù)的路徑定義。需要在項(xiàng)目設(shè)置的服務(wù)部分創(chuàng)建Unity項(xiàng)目ID(或鏈接到現(xiàn)有ID)。您還必須安裝CCD Management SDK軟件包。有關(guān)設(shè)置和使用Cloud Content Delivery Bundle Location選項(xiàng)的信息,請(qǐng)參閱使用Cloud Content Delivery的Addressable Asset系統(tǒng)。

  • Custom: Allows you to edit the values used for the build and load paths. See?Profile variable syntax?for information about setting a variable value using placeholders that Addressables evaluates at build-time and runtime.譯:Custom:允許您編輯用于構(gòu)建和加載路徑的值。有關(guān)使用Addressables在構(gòu)建時(shí)和運(yùn)行時(shí)評(píng)估占位符設(shè)置變量值的信息,請(qǐng)參閱Profile variable syntax。

WARNING

In most cases, you should not change the local build or load paths from their default values. If you do, you must manually copy the local build artifacts from your custom build location to the project's?StreamingAssets?folder before making a Player build. Altering these paths also precludes building your Addressables as part of the Player build.

譯:在大多數(shù)情況下,您不應(yīng)更改本地構(gòu)建或加載路徑的默認(rèn)值。如果這樣做,您必須在制作Player構(gòu)建之前手動(dòng)將本地構(gòu)建產(chǎn)物從自定義構(gòu)建位置復(fù)制到項(xiàng)目的StreamingAssets文件夾中。更改這些路徑也會(huì)導(dǎo)致構(gòu)建Addressables作為Player構(gòu)建的一部分不可行。

See?Builds?for more information about how Addressables uses profiles during content builds.

譯:有關(guān)Addressables在內(nèi)容構(gòu)建期間如何使用profiles的更多信息,請(qǐng)參見(jiàn)構(gòu)建。

TIP

Using multiple profiles is most helpful when you distribute content for your application remotely. If you distribute all content as part of your application install, then the single, default profile might be the only profile you need.

譯:在遠(yuǎn)程分發(fā)應(yīng)用程序內(nèi)容時(shí),使用多個(gè)profiles最為有用。如果您將所有內(nèi)容作為應(yīng)用程序安裝的一部分分發(fā),則可能只需要單個(gè)默認(rèn)profile。

Setting the active profile

The active profile determines the set of variables used when you run a build script.

譯:活動(dòng)profile決定了運(yùn)行構(gòu)建腳本時(shí)使用的變量集。

To set the active profile, either:

譯:設(shè)置活動(dòng)profile,可以:

  1. Open the Groups window (menu:?Window > Asset Management > Addressables > Groups).譯:打開(kāi)Groups窗口(菜單:Window> Asset Management> Addressables> Groups)。

  2. Click the?Profile?menu in the toolbar.譯:?jiǎn)螕艄ぞ邫谥械腜rofile菜單。

  3. Choose the profile to make active.譯:選擇要激活的profile。

Or:

  1. Open the Profiles window (menu:?Window > Asset Management > Addressables > Profiles).譯:打開(kāi)Profiles窗口(菜單:Window> Asset Management> Addressables> Profiles)。

  2. Right- or cmd-click on a profile to open the context menu.譯:右鍵或cmd單擊一個(gè)profile以打開(kāi)上下文菜單。

  3. Choose?Set Active.譯:選擇Set Active。

NOTE

Build scripts include the?Play Mode Scripts?that Addressables invokes when you enter Play mode in the Editor. Some Play Mode scripts use variables from the active profile to locate content. See?Play Mode Scripts?for more information.

譯:構(gòu)建腳本包括Addressables在編輯器中進(jìn)入播放模式時(shí)調(diào)用的Play Mode Scripts。一些Play Mode腳本使用來(lái)自活動(dòng)profile的變量來(lái)定位內(nèi)容。有關(guān)更多信息,請(qǐng)參見(jiàn)Play Mode Scripts。

Adding a new profile

To create a new profile, select?Create?>?Profile. A new profile row appears in the table.

譯:要?jiǎng)?chuàng)建新profile,請(qǐng)選擇Create> Profile。表中會(huì)出現(xiàn)新的profile行。

Every profile must define a value for every variable. When you create a new profile, Addressables copies all values from the currently selected profile.

譯:每個(gè)profile必須為每個(gè)變量定義一個(gè)值。創(chuàng)建新profile時(shí),Addressables會(huì)從當(dāng)前選定的profile復(fù)制所有值。

Profile variables

See [Profile Variables] for more information on how to use profile variables.

譯:有關(guān)如何使用profile變量的更多信息,請(qǐng)參見(jiàn)Profile Variables。

Specifying packing and loading paths

Once you set up the necessary variables in your profile, you can select the build and load paths for an asset group based on those specified variables.

譯:一旦在profile中設(shè)置了必要的變量,就可以基于那些指定的變量選擇一個(gè)資產(chǎn)組的構(gòu)建和加載路徑。

To set your build and load paths:

譯:要設(shè)置構(gòu)建和加載路徑:

  1. Select an Addressable Assets group from the?Project?window.譯:從項(xiàng)目窗口中選擇一個(gè)Addressable Assets組。

  2. In the group’s?Inspector, under?Content Packing & Loading?>?Build and Load Paths, select the desired path pair. If you choose the?<custom>?option, you can specify the build and load paths separately.譯:在組的檢查器下,選擇Content Packing&Loading> Build and Load Paths,選擇所需的路徑對(duì)。如果選擇選項(xiàng),則可以單獨(dú)指定構(gòu)建和加載路徑。

Notice that you do not enter the path directly, but rather select a variable representing the path defined in the?Profiles?window earlier. The?Path Preview?shows the current path, based on the active Profile. To edit a path directly in the Group settings Inspector, set?Build & Load Paths?to?<custom>?and also set the individual?Build?or?Load Path?to?<custom>. The edited path applies to that group only.

譯:請(qǐng)注意,您不直接輸入路徑,而是選擇代表先前在Profiles窗口中定義的路徑的變量。路徑預(yù)覽顯示基于活動(dòng)Profile的當(dāng)前路徑。要直接在Group設(shè)置檢查器中編輯路徑,請(qǐng)將Build&Load Paths設(shè)置為,并將個(gè)別Build或Load Path設(shè)置為。編輯的路徑僅適用于該組。

Profile examples

Consider the following example, demonstrating the local development phase of your content.

譯:考慮以下示例,演示內(nèi)容的本地開(kāi)發(fā)階段。

Content with local and remote bundles stored locally for development.

譯:本地和遠(yuǎn)程捆綁包存儲(chǔ)在本地進(jìn)行開(kāi)發(fā)。

While in development, you would have both your local and remote bundles using local paths, as seen below.

譯:在開(kāi)發(fā)過(guò)程中,您將同時(shí)使用本地路徑和遠(yuǎn)程路徑來(lái)存儲(chǔ)本地和遠(yuǎn)程捆綁包,如下所示。


Paths set for local development.

譯:設(shè)置用于本地開(kāi)發(fā)的路徑。

In this instance, you can see that the local and remote paths are in fact local, which makes it unnecessary to set up a remote server just for local development.

譯:在這種情況下,您可以看到本地和遠(yuǎn)程路徑實(shí)際上是本地的,這使得為本地開(kāi)發(fā)設(shè)置遠(yuǎn)程服務(wù)器變得不必要。

Once the content is ready for production, you would move the remote bundles to a server, as the diagram below shows.

譯:一旦內(nèi)容準(zhǔn)備好進(jìn)行生產(chǎn),您將將遠(yuǎn)程捆綁包移動(dòng)到服務(wù)器,如下圖所示。

Content with the remote bundles moved to a server for production.

譯:將遠(yuǎn)程捆綁包移動(dòng)到服務(wù)器以用于生產(chǎn)的內(nèi)容。

In this case, using profiles, you could change the remote load path for "Production" to that server. Without having to change your asset groups, you can change all of your remote bundles to actually become remote.

譯:在這種情況下,使用profiles,您可以將“Production”的遠(yuǎn)程加載路徑更改為該服務(wù)器。無(wú)需更改資產(chǎn)組,即可將所有遠(yuǎn)程捆綁包實(shí)際變?yōu)檫h(yuǎn)程。

Paths set for hosting remote content

IMPORTANT

  • The Addressables system only copies data from?Addressables.BuildPath?to the StreamingAssets folder during a Player build --?it does not handle arbitrary paths specified through the LocalBuildPath or LocalLoadPath variables. If you build data to a different location or load data from a different location than the default, you must copy the data manually.譯:Addressables系統(tǒng)僅在Player構(gòu)建期間從Addressables.BuildPath復(fù)制數(shù)據(jù)到StreamingAssets文件夾 -- 它不處理通過(guò)LocalBuildPath或LocalLoadPath變量指定的任意路徑。如果將數(shù)據(jù)構(gòu)建到不同位置或從不同位置加載數(shù)據(jù),則必須手動(dòng)復(fù)制數(shù)據(jù)。

  • Similarly, you must manually upload remote AssetBundles and associated catalog and hash files to your server so that they can be accessed at the URL defined by?RemoteLoadPath.譯:同樣,您必須手動(dòng)上傳遠(yuǎn)程AssetBundles以及關(guān)聯(lián)的目錄和哈希文件到您的服務(wù)器,以便它們可以在RemoteLoadPath定義的URL上訪問(wèn)。






Unity_Addressable_Profiles(配置文件)的評(píng)論 (共 條)

分享到微博請(qǐng)遵守國(guó)家法律
石渠县| 离岛区| 景洪市| 精河县| 雅安市| 罗甸县| 松桃| 鹰潭市| 大理市| 仪陇县| 尚义县| 泸州市| 清河县| 武平县| 铜山县| 长宁区| 内黄县| 女性| 泽州县| 平定县| 福州市| 西盟| 南投市| 剑阁县| 衡南县| 濮阳县| 新建县| 江山市| 桃源县| 综艺| 绥宁县| 安多县| 交口县| 泽普县| 云和县| 寿宁县| 浠水县| 内乡县| 巨野县| 普兰店市| 鸡泽县|