UnityARFoundationEssentials icon indicating copy to clipboard operation
UnityARFoundationEssentials copied to clipboard

Error when adding images from local or persistence path to XRRefernceImageLibrary at runtime in unity

Open sivamuruganszi opened this issue 4 years ago • 0 comments

Hi, I have taken one of the example scene (ImageTrackingRuntimeSave) from the UnityARFoundationEssentials project for adding images to XRImageLibrary at runtime.

I have made some changes on that code, like instead of adding the images from unity i loaded it from persistence path, it was working fine initially. After some point of time it was giveing some issue on while adding the images to the library. Even if i load images from my asset folder to XRImageLibrary it is give me an error.

This is the error which i am getting from the script. System.NullReferenceException: Object reference not set to an instance of an object at DynamicLoading+<AddImage>d__6.MoveNext () [0x0009a] in

When i further debug the code its showing error in texture format line, but in my project i have made those images to Read/Write enable and format to RGBA32.

image

But still i am getting the error. Could someone explain me how to solve this?

sivamuruganszi avatar Sep 26 '21 12:09 sivamuruganszi