I just got my Unity3 beta 3 today and have no intention of muddying the forums with Unity 3 bug report-ish posts (it’s not supported after all).
I’m experiencing rather strange and show-stopping errors in the beta and was wondering if I was just doing something wrong or if I should take action (like file a bug report or something).
In scripts which worked in 2.6, I am now receiving the following errors:
‘System.Runtime.InteropServices.DllImportAttribute’ does not contain a constructor that takes ‘1’ arguments,
and ‘System.IO.File’ does not contain a definition for ‘WriteAllBytes’
As [DllImport(“pluginName”)] is even in the Unity 3 documentation as the correct way to designate a function to import from a plugin and WriteAllBytes is in the Unity 3 documentation for EncodeToPNG and my code did not change, I can only assume it is something that has changed with 3.0b.
Win7 x64 w/ Unity 3.0.0b3
Did I do something wrong and how do I fix this? Or is this a Unity 3 b3 bug that has not been mentioned anywhere that I’ve read and should I file a bug report?
Thanks for any advice/answers.
EDIT: The problem was that the build target was set to Web Player. Changing the build target to Standalone seems to have resolved the issues.