Unable to import a .glb file on Android
See original GitHub issueDescribe the bug
Hello there!
I’m trying to import a .glb file using the “Gltf asset” script with all option on default. No custom code.
It’s working fine on the editor, but on Android I’m getting the following :
2023/02/27 17:16:43.283 19335 19365 Error Unity NullReferenceException: Object reference not set to an instance of an object. 2023/02/27 17:16:43.283 19335 19365 Error Unity at GLTFast.Materials.BuiltInMaterialGenerator.GenerateDefaultMaterial (System.Boolean pointsSupport) [0x00000] in <00000000000000000000000000000000>:0 2023/02/27 17:16:43.283 19335 19365 Error Unity at GLTFast.Materials.MaterialGenerator.GetDefaultMaterial (System.Boolean pointsSupport) [0x00000] in <00000000000000000000000000000000>:0 2023/02/27 17:16:43.283 19335 19365 Error Unity at GLTFast.GameObjectInstantiator.AddPrimitive (System.UInt32 nodeIndex, System.String meshName, UnityEngine.Mesh mesh, System.Int32[] materialIndices, System.UInt32[] joints, System.Nullable
1[T] rootJoint, System.Single[] morphTargetWeights, System.Int32 primitiveNumeration) [0x00000] in <00000000000000000000000000000000>:0
2023/02/27 17:16:43.283 19335 19365 Error Unity at GLTFast.GltfImport+<>c__DisplayClass116_0.<InstantiateSceneInternal>g__PopulateHierarchy|2 (System.UInt32 nodeIndex, System.Nullable1[T] parentIndex) [0x00000] in <00000000000000000000000000000000>:0 2023/02/27 17:16:43.283 19335 19365 Error Unity at GLTFast.GltfImport+<>c__DisplayClass116_0.<InstantiateSceneInternal>g__IterateNodes|0 (System.UInt32 nodeI
The .GLB file in question is attached.
Unity 2022.2.2f1 Galaxy Tab S7 with Android 13
I’ve also tried all the manual way to import a .GLB following the documentation, but they all end with the same error message.
Thanks !
Issue Analytics
- State:
- Created 7 months ago
- Reactions:2
- Comments:20
No problem at all. you are welcome 😃
Sorry I haven’t been able to test it out since I created this issue, but I’m glad it’s working with this fix, thanks a lot 😃.