I’m getting the following error message:
Assets/Plugins/PlayerPrefs.cs(224,51): error CS0117: System.IO.File' does not contain a definition for CreateText’
I’m using Unity 3.5 on the Mac. The files were supplied as part of a Digital Tutors online course. Any assistance would be appreciated.
Thanks for the quick reply. I was hoping that the Digital Tutors courses were not platform specific. Is there any way to alter the script to get this to work on the Mac? There are others on the Digital Tutors website who have experienced this same problem.
I wasn’t meaning to suggest that it is a Mac problem, just wanted to rule out the possibility that you had your build settings for your unity project set to a platform that might not support that function. It could be a bug with 3.5 or something else, Im afraid I’ve never seen the tutorial you refer to and haven’t used System.IO.File myself recently so hopefully someone els will be able to help you.
I found a solution to the “Assets/Plugins/PlayerPrefs.cs(224,51): error CS0117: System.IO.File' does not contain a definition for CreateText’” error. Since I’m on the Mac my “Target Platform” was set to “Mac OS X Universal” in the “Build Settings”. I simply switched it to “Windows” and pressed “Switch Platforms” and reopen the scene to remove the error. I hope this helps other Mac users in the future. It appears developing games in a multi-platform environment will be challenging. In this case, I will not be able to publish a Mac “Standalone” app if a PC user edited the game assets. This could be a Bug in the Unity 3.5 release or a different API Compatibility Level setting has to be updated. I’m using .NET 2.0 Subset. My only other option is .NET 2.0.