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

ArgumentNullException occurs when trying to load some models #47

Open
parseccentric opened this issue Feb 3, 2021 · 3 comments
Open
Assignees

Comments

@parseccentric
Copy link
Contributor

This blocks the model from loading and thus the session from proceeding.

v0.2.0

GearBoxAssembly

This appears to be a known issue with Siccity/GLTFUtility.

ArgumentNullException: Value cannot be null in build but not in editor.
This is most likely due to shaders being stripped from the build. To fix this, add the GLTFUtility shaders to the Always Included Shaders list in Graphic Settings.
Source: https://nicedoc.io/Siccity/GLTFUtility#user-content-known-issues

@parseccentric parseccentric self-assigned this Feb 3, 2021
@davtamay
Copy link
Contributor

davtamay commented Feb 4, 2021

Weird so, I cannot get GearBoxAssembly to import in the editor, the asset also does not open for me in the 3D Builder app in windows. I pinpointed the issue to Importer.cs within Siccity.

Task<GLTFObject> deserializeTask = new Task<GLTFObject>(() => JsonConvert.DeserializeObject<GLTFObject>(json)); deserializeTask.Start();

deserializeTask status comes out as Faulted, and the call to "deserializeTask.Result" brings up the error ArgumentNullException: Value cannot be null

This happens before Siccity starts looking for properties (i.e. materials to link shaders to) within the file.

@parseccentric
Copy link
Contributor Author

Thanks for narrowing this down. Odd.

@parseccentric
Copy link
Contributor Author

parseccentric commented Feb 26, 2021

GLTFast comes back with this informative error: (dev/b01cb42 commit)

image

Maybe it is just a faulty model. I need to do some further testing when I have time, which will probably be just validating the model.

But we do still need to catch errors and load an error GameObject instead of halting; I can focus on that.

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