Unity报与System.IO相关的错误

比如这个: Type `System.IO.FileInfo' does not contain a definition for `OpenText' and no extension method `OpenText' of type `System.IO.FileInfo' could be found

你打开VS去查看的时候,会发现报错的方法完完全全存在,但是Unity就是报错!解决方法:把Build Target切换为除去 Web Player的任意格式即可。

原文地址:https://www.cnblogs.com/leiGameDesigner/p/9996576.html