Reference http://www.cnblogs.com/shenggege/p/5165616.html
When I recently upgraded from unity5.1.3 to 5.3.4, we found a problem:
System.IO.File ' does not contain a definition for ReadAllText on webplayer in Unity, surfing the internet for information, a foreigner said this was due to the sandbox ing security of the webplayer, which have certain limitations imposed to prevent malicious code being executed by a unity a Pplication 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 in 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 do not write yourself.
In short, you cannot access the filesystem directly using the System.IO namespace. This have been disabled intentionally by Unity.
The best practice are to use the playerprefs, or to load/save data via a remote Web service. There ' s a discussion on the topic here:
Portal: http://stackoverflow.com/questions/29233253/ System-io-file-does-not-contain-a-definition-for-readalltext-on-webplayer-in-un
You need to convert platform, but the Find button is gray, and clicking the Module Manager button on the right doesn't work,
Have to reopen the installation assistant, tick the Android Build support installation. iOS is the same.
unity5.3.4 no Android module loaded