位置: 编程技术 - 正文
推荐整理分享用HTML代码加载Unity内容 HTML code to load Unity content(html加载条代码),希望有所帮助,仅作参考,欢迎阅读内容。
文章相关热门搜索词:html加载条代码,html怎么加载css,html加载函数,html 加载,html加载中代码,html 加载,html 加载,html加载函数,内容如对您有帮助,希望把文章链接给更多的朋友!
Unity content is loaded in the browser by the Unity Web Player plugin. HTML code usually does not communicate with this plugin directly but through the help of a script called UnityObject. Its primary task is to make Unity content embedding a very simple task by shielding the user from various browser and platform specific issues. It also enables easy Web Player installation.
Unity内容在浏览器通过Unity网络播放器插件加载。HTML代码与这个插件通常不直接通信,而是通过UnityObject的脚本帮助。其主要任务是Unity的内容嵌入一个非常简单的任务,通过从各种浏览器和平台指定发行版屏蔽用户。也可以启用简单的网络播放器安装。
The HTML file generated by Unity when building a web player contains all the commonly required functionality. In most cases you don't have to modify the HTML file at all. The rest of the document explains the inner workings of this file.
HTML文件由Unity在编译网络播放器时生成,包含通常所需的所有功能。在大多数情况下,您不必修改HTML文件。文档的其余部分讲解这个文件的内部怎样工作。
The UnityObject script has to be loaded before it can be used. This is done at the top of the <head> section.
UnityObject脚本加载之后才可以使用,放在顶部的<head>部分中。
The global unityObject variable can now be used to perform various Unity related tasks. The most important one is to embed Unity content. This is performed by invoking the embedUnity method that accepts several parameters. The first one specifies the id of the HTML element that will be replaced by Unity content. It could be any HTML element with <div> being the most common. Think of it as a temporary placeholder where Unity should be placed. The second parameter specifies the path to the web player data file to be displayed. The next two parameters specify the width and height of the display for the web player content. The values provided can be pixel values (e.g. , "") or percentage values (e.g. "%", "%").
全局unityObject变量现在可以用来执行各种Unity相关的任务,其中最重要的是嵌入Unity的内容。这是通过调用embedUnity方法执行,它接受几个参数。第一个参数是指定HTML元素的id,它将被替换Unity内容。可以是任意HTML元素,最常用的是<div>。把它作为一个临时占位符,在那里将放置Unity内容。第二个参数是指定网络播放器用来显示的数据文件的路径。接下来的两个参数是指定网络播放器内容显示的宽和高。提供的可以是像素(例如,,)或百分比(例如,%,%)。
Finally, the HTML placeholder is placed inside the <body> section. It could be as simple as <div id="unityPlayer" />. However for maximum compatibility it's best to place some warning message in case the browser doesn't support JavaScript and the placeholder isn't replaced by UnityObject.
最后,HTML占位符放在<body>部分中。可以是简单的<div id="unityPlayer" />。然而,最大程度的兼容,最好放置一些警告信息,如浏览器不支持JavaScript,UnityObject将不会替换占位符。
unity3d 参考坐标系 参考坐标系(ReferenceCoordinateSystem)列表是让你指定用于变换(移动move、旋转rotate和缩放scale)的坐标系。选项包括视图坐标view,屏幕坐标screen,世界坐
手游云测试工具TestBird登陆韩国 报道/中国移动游戏本土市场在经过-两年的爆发期之后逐渐饱和,在精品化日益明显的今天,已有许多游戏商开始向国际移动游戏市场进军,从海
[3D跑酷] GUIClickEventReceiver 在我们的Unity手机游戏项目中,GUI的表现采用NGUI。记录一下我们的处理方式:问题:1、需要处理大量按钮的点击事件2、需要处理界面跳转事件3、需要
标签: html加载条代码
本文链接地址:https://www.jiuchutong.com/biancheng/382626.html 转载请保留说明!友情链接: 武汉网站建设