開啟unity的webGL專案時出現以下錯誤的原因
阿新 • • 發佈:2019-01-02
前兩天我嘗試匯出u3d的webGL專案,用火狐瀏覽器開啟,打不開,出現如下錯誤:
An error occured running the Unity content on this page. See your browser's JavaScript console for more info. The error was:
uncaught exception: abort(-1) at [email protected]:null/21b3ccc8-02d9-4b14-ad3b-21e2001b487a:1:22814
[email protected]:null/21b3ccc8-02d9-4b14-ad3b-21e2001b487a:1:22997
[email protected]:null/21b3ccc8-02d9-4b14-ad3b-21e2001b487a:29:48759
__Z26RegisterClass_MovieTexturev [RegisterClass_MovieTexture()]@blob:null/21b3ccc8-02d9-4b14-ad3b-21e2001b487a:1:320476
[email protected]:null/ee7e2c84-6036-4343-adae-3353ad18a087:22:1
[email protected]:null/ee7e2c84-6036-4343-adae-3353ad18a087:10:1
[email protected]:null/ee7e2c84-6036-4343-adae-3353ad18a087:10:1
[email protected]:null/ee7e2c84-6036-4343-adae-3353ad18a087:15:1
[email protected]:null/21b3ccc8-02d9-4b14-ad3b-21e2001b487a:29:46880
[email protected]:null/21b3ccc8-02d9-4b14-ad3b-21e2001b487a:29:47707
run/<@blob:null/21b3ccc8-02d9-4b14-ad3b-21e2001b487a:29:47875
An error occured running the Unity content on this page. See your browser's JavaScript console for more info. The error was:
uncaught exception: abort(-1) at [email protected]:null/21b3ccc8-02d9-4b14-ad3b-21e2001b487a:1:22814
[email protected]:null/21b3ccc8-02d9-4b14-ad3b-21e2001b487a:1:22997
[email protected]:null/21b3ccc8-02d9-4b14-ad3b-21e2001b487a:29:48759
__Z26RegisterClass_MovieTexturev [RegisterClass_MovieTexture()]@blob:null/21b3ccc8-02d9-4b14-ad3b-21e2001b487a:1:320476
[email protected]:null/ee7e2c84-6036-4343-adae-3353ad18a087:22:1
[email protected]:null/ee7e2c84-6036-4343-adae-3353ad18a087:10:1
[email protected]:null/ee7e2c84-6036-4343-adae-3353ad18a087:10:1
[email protected]:null/ee7e2c84-6036-4343-adae-3353ad18a087:15:1
[email protected]:null/21b3ccc8-02d9-4b14-ad3b-21e2001b487a:29:46880
[email protected]:null/21b3ccc8-02d9-4b14-ad3b-21e2001b487a:29:47707
run/<@blob:null/21b3ccc8-02d9-4b14-ad3b-21e2001b487a:29:47875
If this abort() is unexpected, build with -s ASSERTIONS=1 which can give more information.
原本以為是webGL或者火狐的某些設定可能不小心修改了,可是重灌了他們還是不行,網上沒有相同答案,有問答也是全英的,看得我要死了。
後來認真看了一下錯誤,忽然發現關鍵句了!就是我在上面標註了紅色的那一句:__Z26RegisterClass_MovieTexturev [RegisterClass_MovieTexture()]@blob:null/21b3ccc8-02d9-4b14-ad3b-21e2001b487a:1:320476。movieTexture相關的,有點熟悉。回看專案,發現有個叫MovieTexture的資料夾,裡面是存放著幾個.mp4視訊檔案。把裡面的視訊全刪了,再匯出一次,正常開啟,成功解決!
結論:
1、這次可能是因為webGL無法識別視訊檔案導致,刪除專案裡所有的視訊檔案即可解決。
2、問題就在錯誤資訊中,認真看看,如果發現哪一句跟你的專案最有關係的,那一句應該就是解決錯誤的關鍵句,比如我的專案時movieTexture那一句。