System.IO.File'是否不包含Unity3D中"AppendAllText"错误的定义? [英] System.IO.File' does not contain a definition for `AppendAllText' error in Unity3D?

查看:124
本文介绍了System.IO.File'是否不包含Unity3D中"AppendAllText"错误的定义?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我对Unity3d陌生,并试图打开一个现有项目.播放时显示以下错误.

I am very new to Unity3d and tried to open an existing project. While playing it shows the following error.

资产/脚本/DataAccess.cs(39,30):错误CS0117:System.IO.File' does not contain a definition for AppendAllText'

Assets/Scripts/DataAccess.cs(39,30): error CS0117: System.IO.File' does not contain a definition forAppendAllText'

我对如何解决这个问题一无所知.我被困在这里.

I dont have any idea about how to solve this. I get stuck over here.

如果有人解决这个问题,将是感激的.

It would be appreciating if anyone solve this problem.

预先感谢...

推荐答案

我遇到了这个问题,团队中没有其他人可以复制它.

I ran into this, where no one else on my team could reproduce it.

我们的目标是iOS平台,由于某种原因,我的构建设置神奇地更改回Web Player.将此BACK更改为iOS可以解决我的问题.

We are targeting the iOS platform, and for some reason, my Build settings changed magically back to Web Player. Changing this BACK to iOS fixed the issue for me.

在Mac上,我进入了File ==> Build Settings ...

On Mac, I went to File ==> Build Settings...

"Web播放器"旁边是团结"图标,因此我将其切换到iOS,然后单击切换平台"按钮.它重新导入了一堆东西,完成后,编译器错误消失了.

The "Unity" icon was next to Web Player, so I switched it to iOS and hit the "Switch Platform" button. It reimported a bunch of stuff and, when it was done, the compiler error went away.

这篇关于System.IO.File'是否不包含Unity3D中"AppendAllText"错误的定义?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆