Hello,
So I am trying to catch a FileNotFoundException and read the file from the exception like this:
catch (FileNotFoundException e)
{
string file = e.FileName;
}
Visual Studio throws no errors, but in unity at compile time it throws:
Type `System.IO.FileNotFoundException' does not contain a definition for `FileName' and no extension method `FileName' of type `System.IO.FileNotFoundException' could be found (are you missing a using directive or an assembly reference?)
any idea why it would do this?
↧