Publishing Builds(发表作品)外文翻译资料

 2022-05-05 10:05

Publishing Builds

At any time while you are creating your game, you might want to see how it looks when you build and run it outside of the editor as a standalone or web player. This section will explain how to access the Build Settings and how to create different builds of your games.

File-gt;Build Settings... is the menu item to access the Build Settings window. It pops up an editable list of the scenes that will be included when you build your game.


The Build Settings window

The first time you view this window in a project, it will appear blank. If you build your game while this list is blank, only the currently open scene will be included in the build. If you want to quickly build a test player with only one scene file, just build a player with a blank scene list.

It is easy to add scene files to the list for multi-scene builds. There are two ways to add them. The first way is to click the Add Current button. You will see the currently open scene appear in the list. The second way to add scene files is to drag them from the Project View to the list.

At this point, notice that each of your scenes has a different index value. Scene 0 is the first scene that will be loaded when you build the game. When you want to load a new scene, use Application.LoadLevel() inside your scripts.

If you#39;ve added more than one scene file and want to rearrange them, simply click and drag the scenes on the list above or below others until you have them in the desired order.

If you want to remove a scene from the list, click to highlight the scene and press Command-Delete. The scene will disappear from the list and will not be included in the build.

When you are ready to publish your build, select a Platform and make sure that the Unity logo is next to the platform; if its not then click in the Switch Platform button to let Unity know which platform you want to build for. Finally press the Build button. You will be able to select a name and location for the game using a standard Save dialog. When you click Save, Unity builds your game pronto. It#39;s that simple. If you are unsure where to save your built game to, consider saving it into the projects root folder. You cannot save the build into the Assets folder.

Enabling the Debug build checkbox on any standalone player will enable Profiler functionality. Additionally, the player will be built with debug symbols, so you can use 3rd party profiling or debugging tools.

Desktop

Web Player Streaming

Streaming Web Players allow your Web Player games to begin playing as soon as Scene 0 is finished loading. If you have a game with 10 levels, it doesn#39;t make much sense to force the player to wait and download all assets for levels 2-10 before they can start playing level 1. When you publish a Streaming Web Player, the assets that must be downloaded will be sequenced in the order of the Scene file they appear in. As soon as all assets contained in Scene 0 are finished downloading, the Web Player will begin playing.

Put simply, Streaming Web Players will get players playing your game faster than ever.

The only thing you need to worry about is checking to make sure that the next level you want to load is finished streaming before you load it.

Normally, in a non-streamed player, you use the following code to load a level:

Application.LoadLevel('levelName');

In a Streaming Web Player, you must first check that the level is finished streaming. This is done through the CanStreamedLevelBeLoaded() function. This is how it works:

var levelToLoad = 1;

function LoadNewLevel () {

if (Application.CanStreamedLevelBeLoaded (levelToLoad)) {

Application.LoadLevel (levelToLoad);

}

}

If you would like to display the level streaming progress to the player, for a loading bar or other representation, you can read the progress by accessing GetStreamProgressForLevel().

Building standalone players

With Unity you can build standalone applications for Windows and Mac (Intel, PowerPC or Universal, which runs on both architectures). It#39;s simply a matter of choosing the build target in the build settings dialog, and hitting the #39;Build#39; button. When building standalone players, the resulting files will vary depending on the build target. On Windows an executable file (.exe) will be built, along with a Data folder which contains all the resources for your application. On Mac an app bundle will be built, containing the file needed to run the application, as well as the resources.

Distributing your standalone on Mac is just to provide the app bundle (everything is packed in there). On Windows you need to provide both the .exe file and the Data folder for others to run it. Think of it like this: Other people must have the same files on their computer, as the resulting files that Unity builds for you, in order to run your game.

Inside the build process

The building process will place a blank copy of the built game application wherever you specify. Then it will work through the scene list in the build settings, open them in the editor one at a time, optimize them, and integrate them into the application package. It will also calculate all the assets that are required by the includ

剩余内容已隐藏,支付完成后下载完整资料


Publishing Builds(发表作品)

At any time while you are creating your game, you might want to see how it looks when you build and run it outside of the editor as a standalone or web player. This section will explain how to access the Build Settings and how to create different builds of your games.

在你创建游戏的时候,你可能想看看它在编辑器之外独立运行或在网页中播放的情况。本节将讲解如何使用开发(发布)设置以及如何创建游戏的不同版本。

File-gt;Build Settings... is the menu item to access the Build Settings window. It pops up an editable list of the scenes that will be included when you build your game.

菜单File-gt;Build Settings...用来访问开发设置窗口,它弹出一个包括你建立的游戏场景的列表。


The Build Settings window(发布设置窗口)

The first time you view this window in a project, it will appear blank. If you build your game while this list is blank, only the currently open scene will be included in the build. If you want to quickly build a test player with only one scene file, just build a player with a blank scene list.

当你第一次在一个项目中查看此窗口,它是空白的。当这个列表空白时,如果你建立游戏,只有当前公开的场景将包含在其中。如果你想快速建立一个只有一个场景文件的测试程序,只需建立一个有空白场景列表的程序。

It is easy to add scene files to the list for multi-scene builds. There are two ways to add them. The first way is to click the Add Current button. You will see the currently open scene appear in the list. The second way to add scene files is to drag them from the Project View to the list.

为多场景作品添加场景文件到列表是很简单的。有两种方法来添加它们。第一种方法是点击Add Current按钮,你会看到当前打开的场景出现在列表中。第二种添加方法是从项目视图中将它们拖到列表中。

At this point, notice that each of your scenes has a different index value. Scene 0 is the first scene that will be loaded when you build the game. When you want to load a new scene, use Application.LoadLevel() inside your scripts.

注意这一点,你的每个场景都有不同的索引值。Scene 0是当你创建游戏时第一个被加载的场景。当你想要载入一个新的场景,在脚本中使用Application.LoadLevel()函数。

If you#39;ve added more than one scene file and want to rearrange them, simply click and drag the scenes on the list above or below others until you have them in the desired order.

如果你已经添加了多个场景文件,并希望重新排列它们,只需在列表中拖动它到其它场景上面或下面,直到你需要的顺序。

If you want to remove a scene from the list, click to highlight the scene and press Command-Delete. The scene will disappear from the list and will not be included in the build.

如果你想从列表中删除场景,单击选中,然后按删除键。该场景会从列表中消失,不会包含在你的作品中。

When you are ready to publish your build, select a Platform and make sure that the Unity logo is next to the platform; if its not then click in the Switch Platform button to let Unity know which platform you want to build for. Finally press the Build button. You will be able to select a name and location for the game using a standard Save dialog. When you click Save, Unity builds your game pronto. It#39;s that simple. If you are unsure where to save your built game to, consider saving it into the projects root folder. You cannot save the build into the Assets folder.

当你准备好发布你的作品,选择一个平台(确保出现Unity标识),如果不是你想要的平台,那么点击Switch Platform按钮,选择你要的平台,最后按下Build按钮。使用标准保存对话框,你可以选择游戏的名称和位置,点击保存,Unity将很快建立你的游戏作品,就这么简单。如果你不确定在哪里保存你的游戏,可以考虑保存到项目的根目录中。不能保存到资源文件夹中。

Enabling the Debug build checkbox on any standalone player will enable Profiler functionality. Additionally, the player will be built with debug symbols, so you can use 3rd party profiling or debugging tools.

在任何独立游戏上使用Debug build调试复选框将启用Profiler函数功能,同时,游戏将带有调试标记,所以你可以使用第三方分析或调试工具。

Desktop (台式电脑)

Web Player Streaming(网络流媒体播放器——网络流媒体,网页游戏)

Streaming Web Players allow your Web Player games to begin playing as soon as Scene 0 is finished loading. If you have a game with 10 levels, it doesn#39;t make much sense to force the player to wait and download all assets for levels 2-10 before they can start playing level 1. When you publish a Streaming Web Player, the assets that must be downloaded will be sequenced in the order of the Scene file they appear in. As soon as all assets contained in Scene 0 are finished downloading, the Web Player will begin playing.

流媒体播放器使你的网页游戏完成加载就立即开始播放场景0。如果你的游戏有10个关卡,并没有多大意义,这将迫使玩家要等待下载完2-10所有关卡,才可以开始玩第一关。当你发布了一个网页游戏,要让下载完的必需资源尽快按顺序出现在场景文件中,场景0所包含的资源一经加载完成,则游戏开始。

Put simply, Streaming Web Players will get players playing your game faster than ever.

The only thing you need to worry about is checking to make sure that the next level you want to load is finished streaming before you load it.

简而言之,流媒体播放器将让玩家玩你的游戏比以前更快。你唯一需要担心的,是要检查确保下一关在加载之前已经完成数据流。

Normally, in a non-streamed player, you use the following code to load a level: 通常,在一个非流播放器的游戏中,可以使用下面的代码来加载一个关卡:

Application.LoadLevel('levelName');

In a Streaming Web Player, you must first check that the level is finished streaming. This is done through the CanStreamedLevelBeLoaded() function. This is how it works: 在流播放器的网页游戏中,你必须先检查已完成数据流的关卡,通过CanStreamedLevelBeLoaded()函数来完成,它是这样工作的:

var levelToLoad = 1;

function LoadNewLevel () {

if (Application.CanStreamedLevelBeLoaded (levelToLoad)) {

Application.LoadLevel (levelToLoad);

}

}

If you would like to display the level streaming progress to the player, for a loading bar or other representation, you can read the progress by accessing GetStreamProgressForLevel().

如果你想在游戏(播放器)中显示关卡数据流的进展情况,比如做一个进度条或其他表现形式,你可以进一步阅读GetStreamProgressForLevel ( )函数部分。

Building standalone players(创建独立游戏)

With Unity you can build standalone applications for Windows and Mac (Intel, PowerPC or Universal, which runs on both architectures). It#39;s simply a matter of choosing the build target in the build settings dialog, and hitting the #39;Build#39; button. When building standalone players, the resulting files will vary depending on the build target. On Windows an executable file (.exe) will be built, along with a Data folder which conta

剩余内容已隐藏,支付完成后下载完整资料


资料编号:[462974],资料为PDF文档或Word文档,PDF文档可免费转换为Word

原文和译文剩余内容已隐藏,您需要先支付 30元 才能查看原文和译文全部内容!立即支付

以上是毕业论文外文翻译,课题毕业论文、任务书、文献综述、开题报告、程序设计、图纸设计等资料可联系客服协助查找。