By default the UnityWeb Playerdisplays a small Unity logo and a progress bar while loading web player content. It is possible to customize the appearance of that loading screen, including both the
logo and progress bar display.
Please note that modifying the loader images is only possible withUnity Pro.
There are six optional parameters that can be passed toUnityObject, which can be used to customize the appearance of the Unity Web Player loading screen. Those optional parameters are:
-
backgroundcolor: The background color of the web player content display region during loading, the default is white.
-
bordercolor: The color of the one pixel border drawn around the web player content display region during loading, the default is white.
-
textcolor: The color of error message text (when data file fails to load for example). The default is black or white, depending on the background color.
-
logoimage: The path to a custom logo image, the logo image is drawn centered within the web player content display region during loading.
-
progressbarimage: The path to a custom image used as the progress bar during loading. The progress bar image’s width is clipped based on the amount of file loading completed, therefore it starts with a
zero pixel width and animates to its original width when the loading is complete. The progress bar is drawn beneath the logo image.
-
progressframeimage: The path to a custom image used to frame the progress bar during loading.
All color values provided must be 6-digit hexadecimal colors, (eg. FFFFFF, 020F16, etc.). The image paths provided can be either relative or absolute links. All images must be PNG files in RGB format (without transparency) or RGBA format (with transparency)
stored at eight bits per channel. Finally, theprogressframeimageand theprogressbarimageshould be the same height.
Here is an example script that customizes the appearance of the Unity Web Player loading screen. The background color is set to light gray (A0A0A0), border color to black (000000),
text color to white (FFFFFF) and loader images toMyLogo.png,MyProgressBar.pngandMyProgressFrame.png.
All parameters are grouped into singleparamsobject and passed toUnityObject2
Constructor.
var params = {
backgroundcolor: "A0A0A0",
bordercolor: "000000",
textcolor: "FFFFFF",
logoimage: "MyLogo.png",
progressbarimage: "MyProgressBar.png",
progressframeimage: "MyProgressFrame.png"
};
var u = UnityObject2({ params: params });
u.initPlugin(jQuery("#unityPlayer")[0], "Example.unity3d");
分享到:
相关推荐
Unity自定义编译器内文件夹的图标和颜色 , 普通的看着没有个性,不用该一行代码,导入进项目就可以直接使用 , 方便快捷 自己可以自定义文件夹的颜色和图标. 自带彩虹文件夹 超优质项目工具 Unity游戏源码 , Unity工具 ...
//背景色pt+='<paramname="backgroundcolor"value="000000"/>';//进度条图片(格式必须为PNG)pt += '
AVProVideo1.11.5 支持高版本 并修复WindowDX报错 Unity视频播放器插件 AVProVideo1.11.5 支持高版本 并修复WindowDX报错 Unity视频播放器插件 AVProVideo1.11.5 支持高版本 并修复WindowDX报错 Unity视频播放器插件...
unity 自定义原生播放器界面
该包解决了这个问题,并允许您自定义键盘以使用您自己的SFX、VFX和字体。 该包将 Text Mesh Pro 与 UI Keyboard 一起导入。在包中还提供了一个示例场景,展示了它的工作方式,但这里也有简要说明! 使用方式:下载包...
基于unity视频播放器,暂时只支持android版本(IOS版可以基于这个原理开发),使用的是Opengl渲染!支
自定义Unity项目框架思维导图
功能包含有开始播放,暂停播放,重播,音量调节,时间显示,面板关闭等功能
unity视频播放器,用自带videoPlayer实现,只有一个.cs工具脚本,直接拖放到RawImage或3d物体上,可播放本地url和videoClip以及网络url视频,可发布pc Android ios。自带加载视频videoClip/url资源,播放/暂停/快进/...
unity 视频播放器插件 AVPro Video 1.8.5.unitypackage
Unity3d网络播放器WebPlayer,支持谷歌44版本及以下版本使用。
# 介绍 首先,这个功能的实现仅为demo,给予正在实现本功能的小伙伴一点思路.如果帮到了一些人也属初心所向,不喜勿喷! ## 逻辑 主要依赖于**UGUI Scroll View**通过调用它的**verticalNormalizedPosition**属性来...
替代Untiyhub打开各种版本Unity项目,适用各种版本Unity,因为Unity hub 老是面临登录,许可证过期的问题,所以弄了个小的exe界面,不过唯一的缺陷就是不能创建项目,只能打开项目,如果创建的新项目的话可以用一个...
在Unity中使用自定义Binary文件保存和载入游戏示例,包括Scene场景与完整测试代码
很好用的unity窗口捕捉插件,可在unity类实时显示和更新外部窗口的画面,简单易用,含demo,完整项目文件。有相关项目需求的同学可以看一下
Unity音乐播放器 musicPlayer public 定义的对象,在unity界面可见,可以直接拖动组件赋值 脚本内记得包含 UI 库 using UnityEngine.UI; 界面预览 点击Main Camera,设置 清除标志 为纯色,背景 设置成 白色 ...
unity添加自定义控件Demo
unity 自定义网格模型
Unity 视频播放插件,支持在线,本地,全景VR的一款功能性极强的U3D播放器插件。.......................................................
团结Unity音乐播放器这个Unity项目是我的第一个Unity项目。 我的Unity技能(例如源代码和GUI)不够好,因此质量很差。 总是欢迎请求和问题!如何使用MUnity1.下载Unity 2019.4.18f1 (推荐版本)。2.下载整个项目。3...