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.Load(asset) fails on Unity #64

Open
BitBarrel opened this issue Aug 8, 2024 · 2 comments
Open

File.Load(asset) fails on Unity #64

BitBarrel opened this issue Aug 8, 2024 · 2 comments

Comments

@BitBarrel
Copy link

BitBarrel commented Aug 8, 2024

This line works well in the Editor on windows:
m_file = File.Load(asset);

But with an Android deployment, it returns zero.

I am also getting this error in the console:
[Worker0] OPENGL NATIVE PLUG-IN ERROR: GL_INVALID_ENUM: enum argument out of range
UnityEngine.GUIUtility:ProcessEvent (int,intptr,bool&)

Any ideas?

@damzobridge
Copy link
Contributor

For the file loading issue, can you confirm that you're using the OpenGL Graphics APIs and not Vulkan? I'm not able to reproduce this on my end on Android.

The OPENGL NATIVE PLUG-IN ERROR: GL_INVALID_ENUM error is a known issue, and we're looking into it.

@BitBarrel
Copy link
Author

Indeed it was caused by Vulkan being set by the automatic graphics API setting.

I have two recommendations to make related to this:

  1. In the example projects (basic and other Unity example projects), do not set the graphics API to automatic but instead to manual with no Vulkan selected.
  2. Detect if Vulkan is used and throw an understandable error instead of quietly not working on Android.

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