我在使用 mootools 导入和显示 Unity3D Web 应用程序时遇到问题。
使用 jQuery 我能够做到这一点,但似乎不使用 jQuery 就无法创建 UnityObject2?
有人对此有解决方案吗?
这里有一些代码:
alert($('content'));
$('content').set("html",'<div id="unityPlayer">\
<div class="missing">\
<a href="http://unity3d.com/webplayer/" title="Unity Web Player. Install now!">\
<img alt="Unity Web Player. Install now!" src="http://webplayer.unity3d.com/installation/getunity.png" width="193" height="63" />\
</a>\
</div>\
<div class="broken">\
<a href="http://unity3d.com/webplayer/" title="Unity Web Player. Install now! Restart your browser after install.">\
<img alt="Unity Web Player. Install now! Restart your browser after install." src="http://webplayer.unity3d.com/installation/getunityrestart.png" width="193" height="63" />\
</a>\
</div>\
</div>');
var config = {
width: croppedWidth,
height: croppedHeight,
params: { enableDebugging:"0" }
};
var u = new UnityObject2(config);
u.initPlugin($('unityPlayer'), "3D/login.unity3d");
亲切的问候!