Using web player templates 使用网络播放器模板

Date:2011-10-29
Desktop

To ease rapid deployment as well as testing of your web player in its intended setup, Unity comes with a selection of different templates and support for custom templates.

为了易于快速部署以及网络播放器设置测试,Unity配备了不同的选择模板,并支持自定义模板。

A template is a folder containing an index file (this could just as easily be a php file as an html file) with some special tags in it and an optional thumbnail image. The name of the folder names the template and it can contain any resources that might be used in the presentation of it - such as subfolders, images, JavaScripts, server-side scripts and so forth.

模板是一个包含索引文件的文件夹(这也可能是一个PHP文件作为HTML文件)带有一些指定标签和一个可选缩略图。模板文件夹中可以包含任意资源,如,子文件夹、图片、JavaScripts、服务器端脚本等等。

Built in templates, accessible for all projects, are located in the WebPlayerTemplates folder in the Resources folder of the Unity editor application and custom templates are picked up from a folder named WebPlayerTemplates in your projects Assets folder.

内置模板,可用于所有项目,位于Unity应用程序\Editor\Data\Resources\WebPlayerTemplates文件夹,自定义模板是从在项目面板新建的WebPlayerTemplates文件夹中,拾取一个自定义的文件夹名(在WebPlayerTemplates文件中创建一个文件夹,其中新建index.html和thumbnail.png等文件,就可自定义模板了,可以把官方的复制进来修改就容易多了)。

Templates are selectable in the player settings. You will find all available templates listed there with each their thumbnail (or the default one if no thumbnail file was provided) and name. Some templates have additional properties, which can be tweaked in the text fields immediately below the template selector.

模板在播放器设置中是可选择的。会发现所有带有缩略图和名称的可用模板列表。默认是提供三个模板。

WebPlayerTemplates 播放器模板

Template index file tags translation table:

模板索引文件标签翻译表:

Tag 标签 Meaning 含义
%UNITY_WEB_NAME% Name of the webplayer. 网络播放器名称
%UNITY_WIDTH% Width of the webplayer. 网络播放器的宽度
%UNITY_HEIGHT% Height of the webplayer. 网络播放器的高度
%UNITY_WEB_PATH% Path to the unity3d file. unity3d文件的路径
%UNITY_UNITYOBJECT_LOCAL% Path to the local UnityObject.js file. 加载UnityObject.js文件的路径
%UNITY_UNITYOBJECT_URL% URL UnityObject.js hosted on unity3d.com. 链接UnityObject.js托管在unity3d.com
%UNITY_BETA_WARNING% Location for the Unity beta build warning message. Unity测试版警告信息的位置
%UNITY_CUSTOM_SOME_TAG% Custom template tag "Some tag" - can be set from player settings. 自定义模板标签

页面最后更新: 2010-07-12

分类:Manual|评论: 0|浏览: 43 翻译: U_鹰
评论
暂无评论
发表评论
用户名:

评论审核后才会显示!