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

Model not importing on android #240

Open
MohamadTawil opened this issue Apr 17, 2023 · 1 comment
Open

Model not importing on android #240

MohamadTawil opened this issue Apr 17, 2023 · 1 comment

Comments

@MohamadTawil
Copy link

I'm trying to import the data from a URL and load the model into Unity. It works great on a PC however whenever I try to run it on my Android phone it stops at the Importer.LoadFromBytes() method and after some time the phone turns off.
Any help would be greatly appreciated.

@alizizkova
Copy link

alizizkova commented May 1, 2024

Check if you inserted all GLTF shaders into all included shaders in Project Settings/Graphics.
(This was my problem, model was loaded in editor, but not on Android), using this code plus included all shaders, I can load model on Android runtime:
byte[] glbData = File.ReadAllBytes(modelPath);
Importer.ImportGLBAsync(glbData, new ImportSettings(), OnModelImported);
otherwise try to load a small 3D model (it could be memory consuming problem)

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