unity5.3.4之no android module loaded

來源:互聯網
上載者:User

標籤:

參考http://www.cnblogs.com/shenggege/p/5165616.html

最近從unity5.1.3升級到5.3.4的時候,發現有個問題:

system.io.file‘ does not contain a definition for readalltext on webplayer in Unity, 上網查資料,有個老外說This is due to the sandboxing security of the webplayer, which has certain limitations imposed to prevent malicious code being executed by a unity application via the browser.

Unity‘s docs include a page explaining this:

http://docs.unity3d.com/Manual/SecuritySandbox.html

Which includes the following brief description of the limitations:

  • Restrictions on accessing data on a domain other than the one hosting your .unity3d file.
  • Some limitation on the usage of the Sockets.
  • Disallowing invocation of any method we deemed off limits. (things
    like File.Delete, etc).
  • Disallowing the usage of System.Reflection.* to call private/internal methods in classes you did not write yourself.

In short, you cannot access the filesystem directly using the System.IO namespace. This has been disabled intentionally by Unity.

The best practice is to use the PlayerPrefs, or to load/save data via a remote web service. There‘s a discussion on the topic here:

傳送門:http://stackoverflow.com/questions/29233253/system-io-file-does-not-contain-a-definition-for-readalltext-on-webplayer-in-un

既需要轉換platform,但是發現按鈕是灰色的,點擊右邊的Module Manager按鈕也不管用,

只好重新開啟安裝助手,勾選Android Build Support安裝即可。ios也一樣。

unity5.3.4之no android module loaded

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.