关于Unity3D中WebCore插件的问题
2011-09-19 15:27
429 查看
Unit3D中提供了一个叫做WebCore的插件,可以在Unity中嵌入web页面,很方便,果断下载下来尝试一把。
使用的版本是2011-4月份的dll,下图:
下载的压缩包里有这么一个文件,内容如下:
意思是说为了更好的......,UnityWebCore需要在OpenGL模式下运行,然后执行UnitWebCoreDemo.bat,而不是UnitWebCoreDemo.exe。其实UnitWebCoreDemo.bat也就是通过命令行以-force-opengl参数执行了UnitWebCoreDemo.exe。果断查文档,-force-opengl这个参数就是使unity的可执行文件以opengl方式执行。
按照说明,我分别使用opengl模式和非opengl模式运行了,都不行,求解释!!!!
1.运行UnitWebCoreDemo.bat,截图如下:
特别卡,帧率超低,而且文字(英文)也不显示了(这个是Demo中别人编辑好的exe文件,我打开工程看了下,ForceOpenGl选项是选上的)
2.运行UnitWebCoreDemo.exe,截图如下:
如同上面的说明文档一样,将会是black plane(这个就是以非-force-opengl参数运行的结果)
3.打开工程,将BForce OpenGL选项不勾选,再重新bulid,再运行,结果如下:
可以显示,但是背景是黑的,而且没有彩色,文字神马的是灰色的
4.在Unity Editor 分别勾选和不勾选BForce OpenGL,调试运行,结果如下:
和上面图唯一的区别就是有彩色了。。。。
求解释啊!!!!!
后续:
将该问题提交到Unity Community 的Forum上,http://forum.unity3d.com/threads/83071-Unity3d-plugin-for-embedding-webpages-on-WINDOWS-is-ready!/page6
回答如下:
The Editor can't be forced into OpenGL mode its always in DX, so 4 is to be expected.
The only way to performantly draw on a texture is forcing opengl which out of any halfway professional view is a big no go as it works badly and has a plentitude of problems.
you might actually want to look into the Awesonium thread where a solution for Unity is provided, it works independent of force opengl
&
The problem of it not working in the editor is not changeable at all. The editor is always in DX mode and in DX mode you can't draw on a render textuer from a plugin which is the root behind the issue you see here.
The same would happen on old intels or crappy ati drivers.
The Awesonium does not use render texture drawing from the plugin so yes it works better (and awesonium out of the box is already a game engine focused browser with some years of track record on that end)
简译:
编辑器模式下是不支持OpenGL 的,只支持DX
唯一可以实现高性能显示纹理的方式就是OpenGL模式,但是,在所有非专业版中,它都表现的不是那么好。
你可以试试Awesonium 这个玩意,他是不依附于OpenGL的。
&
在编译器模式下的这种问题是不可改变的,因为编译器总是在DX模式下渲染,而DX模式你不可以以插件渲染的方式来渲染东西,这就是所有问题的根源。
Awesonium是不用从插件中渲染材质的,所以它不会有这个问题。
看来这个Awesonium更牛叉啊,果断研究去。
使用的版本是2011-4月份的dll,下图:
下载的压缩包里有这么一个文件,内容如下:
意思是说为了更好的......,UnityWebCore需要在OpenGL模式下运行,然后执行UnitWebCoreDemo.bat,而不是UnitWebCoreDemo.exe。其实UnitWebCoreDemo.bat也就是通过命令行以-force-opengl参数执行了UnitWebCoreDemo.exe。果断查文档,-force-opengl这个参数就是使unity的可执行文件以opengl方式执行。
-force-opengl (Windows only)
Make the game use OpenGL for rendering, even if Direct3D is availabe. Normally Direct3D is used; and OpenGL is used only if Direct3D 9.0c is not available.按照说明,我分别使用opengl模式和非opengl模式运行了,都不行,求解释!!!!
1.运行UnitWebCoreDemo.bat,截图如下:
特别卡,帧率超低,而且文字(英文)也不显示了(这个是Demo中别人编辑好的exe文件,我打开工程看了下,ForceOpenGl选项是选上的)
2.运行UnitWebCoreDemo.exe,截图如下:
如同上面的说明文档一样,将会是black plane(这个就是以非-force-opengl参数运行的结果)
3.打开工程,将BForce OpenGL选项不勾选,再重新bulid,再运行,结果如下:
可以显示,但是背景是黑的,而且没有彩色,文字神马的是灰色的
4.在Unity Editor 分别勾选和不勾选BForce OpenGL,调试运行,结果如下:
和上面图唯一的区别就是有彩色了。。。。
求解释啊!!!!!
后续:
将该问题提交到Unity Community 的Forum上,http://forum.unity3d.com/threads/83071-Unity3d-plugin-for-embedding-webpages-on-WINDOWS-is-ready!/page6
回答如下:
The Editor can't be forced into OpenGL mode its always in DX, so 4 is to be expected.
The only way to performantly draw on a texture is forcing opengl which out of any halfway professional view is a big no go as it works badly and has a plentitude of problems.
you might actually want to look into the Awesonium thread where a solution for Unity is provided, it works independent of force opengl
&
The problem of it not working in the editor is not changeable at all. The editor is always in DX mode and in DX mode you can't draw on a render textuer from a plugin which is the root behind the issue you see here.
The same would happen on old intels or crappy ati drivers.
The Awesonium does not use render texture drawing from the plugin so yes it works better (and awesonium out of the box is already a game engine focused browser with some years of track record on that end)
简译:
编辑器模式下是不支持OpenGL 的,只支持DX
唯一可以实现高性能显示纹理的方式就是OpenGL模式,但是,在所有非专业版中,它都表现的不是那么好。
你可以试试Awesonium 这个玩意,他是不依附于OpenGL的。
&
在编译器模式下的这种问题是不可改变的,因为编译器总是在DX模式下渲染,而DX模式你不可以以插件渲染的方式来渲染东西,这就是所有问题的根源。
Awesonium是不用从插件中渲染材质的,所以它不会有这个问题。
看来这个Awesonium更牛叉啊,果断研究去。
相关文章推荐
- 关于Unity3D中WebCore插件的问题
- unity3d中关于导入插件出错的问题,注意事项!!!
- unity3d中关于导入插件出错的问题
- CS插件教程系列之关于服务器插件的常见问题
- 关于升级Xcode版本后插件不能用的问题解决
- 关于eclipse添加maven插件找不到Maven>Enable Dependency Management选项的问题解决
- 关于在Windows Mobile下今日插件使用WTL的问题
- 关于selenium 用Webdrive打开Firefox不含有插件的问题(python)
- 关于Studio的版本、gradle版本和插件版本的问题
- [unity3d]关于MouseLook的问题
- [求助]关于eclipse下开发串口操作插件的问题
- chrome插件开发之:关于处理定时下单的时间点的处理问题
- 关于wordpress主题、插件上传和下载问题及其上传图片权限问题解决方案
- 关于Google浏览器添加QQ电脑管家广告过滤插件出现2345主页拦截问题
- Unity3D关于一个父物体下锚点位置问题
- 关于MyEclipse8.0安装axis2插件问题续之处理报错java.lang.reflect.InvocationTargetException
- 关于Android Studio升级到2.0后和Gradle插件不兼容的问题
- 关于javaScript开发工具的问题(我在myeclipse里安装aptana插件过程)
- 创建一个quick-cocos2d-x工程和关于sublime text的插件QuickDev的一个小问题
- 关于使用easyui 插件时的 文件引入问题