码迷,mamicode.com
首页 > 移动开发 > 详细

unity5.3.4之no android module loaded

时间:2016-05-11 19:25:41      阅读:607      评论:0      收藏:0      [点我收藏+]

标签:

参考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

标签:

原文地址:http://www.cnblogs.com/juji-baleite/p/5482836.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!