2014-09-02 172 views
0

我正在用Unity構建一個簡單的應用程序,並且需要將其嵌入到具有其他html元素的網絡瀏覽器中。我發現這個插件: http://www.41post.com/3513/programming/embedding-the-unity-web-player-with-jquery在網絡瀏覽器中嵌入unity3d網絡播放器

在開始時它似乎工作,然後我發現只有我的macbook管理顯示Unity應用程序。 我嘗試用Windows PC上,並統一網絡玩家只要進入全屏模式,覆蓋網站的所有其他元素,然後,我嘗試另一個MacBook和一臺Linux計算機和網絡瀏覽器控制檯給了我這個:

Uncaught SyntaxError: Unexpected identifier 
Failed to load resource: net::ERR_FILE_NOT_FOUND file:///home/path_to_.unity3d file/%%INSTALLIMAGE%% 
Uncaught ReferenceError: AutomaticReload is not defined 
Invalid App Id: Must be a number or numeric string representing the application id. all.js:57 
The "fb-root" div has not been created, auto-creating all.js:57 
FB.getLoginStatus() called before calling FB.init(). all.js:57 
GET chrome-extension://boadgeojelhgndaghljhdicfkmllpafd/cast_sender.js net::ERR_FAILED www-embed-player.js:140 
GET chrome-extension://dliochdbjfkdbacpmhlcpmleaejidimm/cast_sender.js net::ERR_FAILED www-embed-player.js:140 
GET chrome-extension://hfaagokkkhdbgiakmmlclaapfelnkoah/cast_sender.js net::ERR_FAILED www-embed-player.js:140 
GET chrome-extension://fmfcbgogabcbclcofgocippekhfcmgfj/cast_sender.js net::ERR_FAILED www-embed-player.js:140 
GET chrome-extension://enhhojjnijigcajfphajepfemndkmdlo/cast_sender.js net::ERR_FAILED www-embed-player.js:140 
Resource interpreted as Image but transferred with MIME type image/*: "https://s3.amazonaws.com/agilecrm/panel/uploaded-logo/1400137616110?id=upload-container". livechat-v2.js:1 
Uncaught ReferenceError: YT is not defined 

我在說的瀏覽器是所有電腦上的Chrome瀏覽器。

任何人都知道如何解決這個問題?

編輯:我已禁用所有可能會干擾瀏覽器的擴展/插件。

+0

你有什麼理由使用jQuery來嵌入它嗎?查看「Default」webplayer build的源代碼,看看它是如何嵌入頁面的。 – 2014-09-02 16:32:19

+0

我對這個東西相當陌生,我在某處讀到這是唯一一個製作帶有html元素和統一網頁播放器的網頁的方法。 你可以請鏈接我一個來源或東西? 非常感謝! – ste 2014-09-02 16:40:15

+0

您不需要外部資源,只需在您選擇Webplayer平臺時單擊build,即可獲得HTML文件。 – 2014-09-02 16:41:59

回答

0

當您爲網絡構建時,會生成兩個文件。包含遊戲本身的統一文件和佔位符.html文件。只需打開這個最後的html文件,並探究遊戲是如何嵌入的。