GLTFUtility icon indicating copy to clipboard operation
GLTFUtility copied to clipboard

Null pointer at GetTextureCached Method

Open ozankonur opened this issue 4 years ago • 6 comments

Hi, first thank you for this good Utility. I am trying to load gltf ( https://raw.githubusercontent.com/KhronosGroup/glTF-Sample-Models/master/2.0/AnimatedCube/glTF/AnimatedCube.gltf ). But I am getting error like ;

NullReferenceException: Object reference not set to an instance of an object Siccity.GLTFUtility.GLTFTexture+ImportResult+<GetTextureCached>d__3.MoveNext () (at Library/PackageCache/com.siccity.gltfutility@8a77cd5b2e7505556f7a15fa13d81b834559dd21/Scripts/Spec/GLTFTexture.cs:28)

At Siccity.GLTFUtility namespace, GetTextureCached method and this line: IEnumerator en = image.CreateTextureAsync(linear, x => cache = x, onProgress);

What can be the problem ?

ozankonur avatar May 17 '20 22:05 ozankonur

I am having the same issue when trying to import a GLB file. I can share the file if this helps.

mimminito avatar Aug 29 '20 10:08 mimminito

I have the same issue on some files. Is there any update here?

WojciechSwierczykPTC avatar Dec 30 '21 12:12 WojciechSwierczykPTC

I'm also facing the same issue, is there any fix?

rvenky125 avatar Sep 27 '22 08:09 rvenky125

Got same issue here

MaybeELEMENT avatar Oct 30 '22 09:10 MaybeELEMENT

Same issue

poworoznykd avatar Jan 22 '23 23:01 poworoznykd

It is due to the image being null. Still looking into why it is null but if you just add a null check it adds your model but with no texture.

poworoznykd avatar Jan 22 '23 23:01 poworoznykd