Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

File' does not exist in the namespace UnityEngine.Windows' #1

Open
einstyle opened this issue May 12, 2017 · 2 comments
Open

File' does not exist in the namespace UnityEngine.Windows' #1

einstyle opened this issue May 12, 2017 · 2 comments

Comments

@einstyle
Copy link

When imported, two errors:

Assets/Scripts/ImageToEmotionAPI.cs(39,44): error CS0234: The type or namespace name File' does not exist in the namespace UnityEngine.Windows'. Are you missing an assembly reference?

Assets/Scripts/ShowImageOnPanel.cs(28,27): error CS0103: The name `File' does not exist in the current context

How to solve them?

@einstyle
Copy link
Author

Ok, it seems that this can work:
In ShowImageOnPanel.cs:
#if UNITY_WINRT
byte[] fileData = UnityEngine.Windows.File.ReadAllBytes(fileName);
#else
byte[] fileData = System.IO.File.ReadAllBytes(fileName);
#endif

Instead, in ImageToEmotionAPI.cs:
#if UNITY_WINRT
byte[] bytes = UnityEngine.Windows.File.ReadAllBytes(fileName);
#else
byte[] bytes = System.IO.File.ReadAllBytes(fileName);
#endif

@Amal-A-U
Copy link

how does this work??

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants