BuildPipeline.BuildPlayer 编译播放器
来源:互联网 发布:软件测试简答题 编辑:程序博客网 时间:2024/05/22 13:46
static function BuildPlayer (levels : string[], locationPathName : string, target : BuildTarget, options : BuildOptions) : string
Parameters参数
- levelsThe scenes to be included in the build. If empty, the currently open scene will be built. Paths are relative to the project folder (Assets/MyLevels/MyScene.unity).
包含在编译中的场景,如果为空,当前打开的场景将被编译。路径相对于项目文件夹(Assets/MyLevels/MyScene.unity). - locationPathNameThe path where the application will be built. Must include any necessary file extensions, like .exe, .app, .unity3d or .wdgt.
将被编译应用程序的路径,必须包括所有必要的文件扩展名。 - targetThe BuildTarget to build.
要编译的BuildTarget。 - optionsAdditional BuildOptions, like whether to run the built player.
添加编译选项,例如是否运行那种播放器。
string - an error message if an error occurred.
如果产生错误,返回一个错误消息。
Description描述
Builds a player (Unity Pro only).
生成一个播放器(仅用于Unity Pro)。
Use this function to programatically create a build of your project.
使用这个函数通过编程来创建一个你的项目编译。
// Build a streamed unity3d file. This contain one scene that can be downloaded// on demand and loaded once it's asset bundle has been loaded.//生成一个流unity3d文件。这包含一个场景,可以按需下载和加载,一旦它的资源包已被加载。@MenuItem ("Build/BuildWebplayerStreamed")static function MyBuild(){var levels : String[] = ["Assets/StreamedScene1.unity", "Assets/StreamedScene2.unity","Assets/StreamedScene3.unity"];BuildPipeline.BuildPlayer( levels, "StreamedWebplayer.unity3d",BuildTarget.WebPlayer, BuildOptions.BuildAdditionalStreamedScenes);}
When BuildOptions.BuildAdditionalStreamedScenes is used, the resulting file will not be a traditional player. The result will be a file that can be dynamically loaded in at runtime. In order to dynamically load one of these extra scenes in, download the file using the WWW class, and make sure to call WWW.assetBundle. You don't actually have to call AssetBundle.LoadAll(). As soon as you assigned WWW.assetBundle to a variable, from that point on, you can use regular Application.LoadLevel() andApplication.LoadLevelAdditive() calls to load the level as you would usually do.
当BuildOptions.BuildAdditionalStreamedScenes被使用,生成的文件将不是传统的播放器。其结果将是一个可以在运行时动态加载的文件。为了动态加载另一个场景,使用WWW类下载文件,并确保调用了WWW.assetBundle。你实际上并不需要调用AssetBundle.LoadAll()。只要你指定WWW.assetBundle到一个变量,通常会这样做,可以使用普通的Application.LoadLevel()和Application.LoadLevelAdditive() 调用来加载关卡。
// Build a streamed unity3d file. This contain one scene that can be downloaded// on demand and loaded once it's asset bundle has been loaded.//生成一个流unity3d文件。这包含一个场景,可以按需下载和加载,一旦它的资源包已被加载。BuildPipeline.BuildPlayer(["Assets/DynamicallyLoadedScene.unity"], "DynamicallyLoadedScene.unity3d",BuildTarget.WebPlayer, BuildOptions.BuildAdditionalStreamedScenes);
- BuildPipeline.BuildPlayer 编译播放器
- Unity -- BuildPipeline 编译管线
- BuildPipeline.BuildAssetBundle 编译资源包
- Unity3D buildPlayer
- Android编译VLC播放器
- 射手播放器编译错误解决方法(splayer)
- 海豚播放器 ffmpeg 编译之经历
- 嵌入式 Ubuntu下编译vlc播放器
- VLC-开源播放器编译
- 开源播放器ijkplayer-android编译
- MAC 编译生成万能播放器
- VLC-开源播放器编译
- Unity Asset BuildPipeline.PushAssetDependencies 函数
- live555编译、播放示例
- Unity5 打包 AssetBundles (BuildPipeline.BuildAssetBundles)
- Unity5 新AssetBundle打包方式 BuildPipeline.BuildAssetBundles
- 编译运行mplayer播放器bgr不支持的问题
- 自己动手编译播放器MPC-HC的源码
- C++ AMP: C++ AMP 平铺功能简介
- Spring MVC + TomCat 环境搭建
- JavaScript protocol 属性
- 批处理迭代目录
- task相关函数的功能
- BuildPipeline.BuildPlayer 编译播放器
- linux内核编译过程及配置说明解释 (4)--processor type 与power management,ACPI options
- CSS兼容大全
- JDK 解析xml文件
- Android 对话框(Dialog)大全 建立你自己的对话框
- C++ AMP: C++ AMP Articles in MSDN Magazine April issue
- android 自适应 多屏幕支持
- RHEL6通过安装光盘或ISO文件配置yum安装X11 server
- 倒计时100天